Forum Discussion
That_Analyst
Microsoft Employee
3 years agoCount blanks
I want to get the count of Customers from June that were not seen in July. So Count of customers that had sales in June but not in July. =DISTINCTCOUNT(CustomerId_June),CustomerId_July=blank() Wh...
veenashenolikar
Helper V
3 years agoHi That_Analyst ,
You could try creating a column with -
Flag = VAR firstid =
FIRSTNONBLANK ( 'Table'[ID_June], "" )
VAR compare =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( ALL ( 'Table' ), 'Table'[ID_July] = firstid)
)
RETURN
IF ( ISBLANK ( compare ), 0, compare )
Then create a measure for count as -
Count = CALCULATE(DISTINCTCOUNT('Table'[ID_June]),FILTER('Table',[Flag]=1))
Hope this helps!
Regards,
Veena.