Excel Help Counting Sub Groups

Copper Contributor

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

 

Example:

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

@Red869 

Creating PivotTable add data to data model and create measure

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

and use it in PivotTable

image.png