Forum Discussion
Distinct count with previous date criteria
- 3 years ago
Hi, Anonymous ;
I create a simple test file. and create a measure as follow:
Measure = COUNTROWS(EXCEPT(VALUES('Table'[ID]), SUMMARIZE(FILTER(ALL('Table'), [Date]<=MIN('Table'[Date])&&[Date]>=EDATE(MIN('Table'[Date]),-12)),[ID])))the final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous ;
I create a simple test file. and create a measure as follow:
Measure =
COUNTROWS(EXCEPT(VALUES('Table'[ID]),
SUMMARIZE(FILTER(ALL('Table'),
[Date]<=MIN('Table'[Date])&&[Date]>=EDATE(MIN('Table'[Date]),-12)),[ID])))
the final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-yalanwu-msft, thanks for this. Looks really good. I think I will be able to use this in my report.
Just one quick question about the measure you provided;
Does this measure return unique, distinct IDs? If not, what and where to add to the measure to return only distinct IDs?
Sorry, I am fairly new to Power BI DAX.
Thanks,