Forum Discussion
Getting help with this complicated DAX question
- 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).
The LASTDATE filter will adjust the filter context to only return a single date. COUNTROWS then calculates the employee count for that date (month).
None of this though, seems to specify about returning the lastdate value in a specified month. How does this DAX function work for this use case? Thanks for your reply...
- AlexisOlson2 years agoSuper User
LASTDATE returns the latest date within whatever filter context is set, so if there is a slicer or a filter specifying a month, you get the last date in that month.
- YoungLearning2 years agoHelper III
I 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?
- YoungLearning2 years agoHelper III
fyi when i did this just to test it out... why is it like this?
MeasureLast = LASTDATE(Date_X[Date])