Forum Discussion
Anonymous
4 years agoNot applicable
Counting distinct items based on date criteria
Greetings, I am having an issue with figuring out a measure that I just cant seem to hammer out. I am very new with using DAX. I am needing to count rows based on dates, essentially somethin...
- 4 years ago
Hi Anonymous
Thanks for reaching out to us.
Try this measure
count = COUNTROWS(FILTER('Table','Table'[NextDate] < TODAY() && 'Table'[NextDate] = CALCULATE(MAX('Table'[NextDate]),ALLEXCEPT('Table','Table'[Name]))))I also create a sample for your reference, see file attached bellow.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi Anonymous
I tried to solve the problem based on my understaing. If this is not the requirement, please post more details as Greg_Deckler mentioned below.
The below measure will get the count of items which has dates less than today.
m_count1 =
CALCULATE( COUNT(Table1[Client]),
FILTER(Table1,Table1[Date]<TODAY()),
ALLEXCEPT(Table1,Table1[Client])
)
Here is teh result for the sample dataset:
Thanks
Raj