Forum Discussion
YoungLearning
Helper III
2 years agoGetting help with this complicated DAX question
Can someone explain to me why CountRows since the employee name will be recorded for every month he/she stays employed, and why that filter LastDate Date?
- 2 years ago
The LASTDATE filter will adjust the filter context to only return a single date. COUNTROWS then calculates the employee count for that date (month).
YoungLearning
Helper III
2 years agoI have tested it out and I kinda see how it works, on a visual level. But does DAX know that the last date of the month is e.g. 31st of December? How does using different date columns of different table affect the count, how does it know without using like Distinct Count or something?
AlexisOlson
Super User
2 years agoIt's referencing a date table which should have all dates you need, so it's just a max over the dates in the date context.