Forum Discussion
DAX Measure - Distinct Count YTD Values
- 5 years ago
Anonymous , have tried datesytd with date table ?
YTD Sales = CALCULATE(DISTINCTCOUNT(AS400_Transactions[Order_Date Recalc]),DATESYTD('Date'[Date],"12/31"))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Hi Tim,
That worked too - thank you! Using this method, how would I look at how many transactions happened for FY 2020?
Hi cy115,
The TOTALYTD function allows you to customize the year end with additional input to allow for FY and such (image 1).
SQLBI has some more in-depth info regarding this so I'd check this article out for some more details if you'd like to try that method: The hidden secrets of TOTALYTD - SQLBI
Regards,
Tim