Forum Discussion
mikeborg82
8 years agoAdvocate II
DAX help
PY YTD Terms = CALCULATE(DISTINCTCOUNT(Terms[Employee Number]),FILTER(SAMEPERIODLASTYEAR('Date Dim'[Date]),CONTAINS(VALUES('Date Dim'[Prior Year]), 'Date Dim'[Prior Year], 'Date Dim'[Date]))) I h...
- 8 years ago
Ashish_Mathur
8 years agoSuper User
You are welcome. The DATESBETWEEN() function used in the YTD terminations measure ensures that the arithmatic (distinctcount in our case) starts from the 1st day of the year and goes till the last date of the month chosen in the visual filter.
mikeborg82
8 years agoAdvocate II
sorry to keep this going - but is there any way to set this up a bit more dynamically? I would rather not have to update the model each month and I can't believe that PowerBI doesn't have a better solution..