Forum Discussion
Distinct Count over entire Calendar table
I need to retrieve the DISTINCTCOUNT customers only for the last buy it. But, my measure return the DISTINCT COUNT for every month. The picture below shows the behavior.
The measure shows the calculation for all months, instead the month with last buy.
Junho = June
Julho = July
Can you help me, please?
Hi Anonymous, Greg_Deckler
I got it. The prior formula was correct. The filter context applied on Customer Table have changed the results. But, I didn´t understand that behavior it.
4 Replies
- Thyago_Rezende
Resolver I
I need to retrieve the DISTINCTCOUNT customers only for the last buy it. But, my measure return the DISTINCT COUNT for every month. The picture below shows the behavior.
The measure shows the calculation for all months, instead the month with last buy.
- Greg_Deckler
Community Champion
Please post sample data.
- AnonymousNot applicable
HI Thyago_Rezende,
You can use 'lastdate','all' functions to achieve your requirement.
Measure = CALCULATE(DISTINCTCOUNT('Table'[Client]),FILTER(ALL('Table'),[Date]=LASTDATE(ALL('Table'[Date]))))Regards,
Xiaoxin Sheng
- Thyago_Rezende
Resolver I
Hi Anonymous, Greg_Deckler
I got it. The prior formula was correct. The filter context applied on Customer Table have changed the results. But, I didn´t understand that behavior it.