Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

DISTINCT COUNT AND GROUP BY

Hello:

 

I am trying to do GROUP BY in a DAX statement with DISTINCT COUNT. 

 

When I use this formula I get this:

 

CALCULATE
    (DISTINCTCOUNT(Table_1[Dim_1]),
        FILTER(Table_1,Table_1[Dim_1]="xyz")
        )
 
89 unique programs for YTD
ProgramCount
Program_134
Program_220
Program_335
Total89

 

But I would like this number to show up GROUP BY month:

 

MonthCount
September78
October88
Total166

 

I want it to DISTINCT(COUNT) by Month and then SUM. 

 

ProgramCount
Program_154
Program_240
Program_372
Total166

 

2 Replies