Excel Help Counting Sub Groups

Occasional Visitor

I am trying to count subgroups from a pivot table and cannot seem to figure it out. 



Blue            6 (Total from below)

     Oceans  1

     Sky        2

     Eyes      3


I want to get a return that gives me "3" for the number of texts (Ocean, Sky, and Eyes), preferably in the next cell to the 6. 

1 Reply


Creating PivotTable add data to data model and create measure

Number of Texts :=
VAR n =
    DISTINCTCOUNT ( Table1[Text] )
    IF ( ISFILTERED ( Table1[Text] ), BLANK (), n )

and use it in PivotTable