Forum Discussion
Dax
Alex_Hasan , if you have date table marked as date table, then you can create a measure like example
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
refer if needed
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Hi amitchandak , what would be the dax for total sales here? Because I need to calculate it properly.
Is it SUM(Sales[Net Sales])?
- v-chenwuz-msft4 years ago
Community Support
Hi Alex_Hasan ,
Did you want sum all the sales until the selected date?
Maybe you can try this measure to do that.
Measure = CALCULATE ( [Total sales], FILTER ( ALLSELECTED ( Dim_Date ), [Date] <= MAX ( 'Dim_Date'[Date] ) ) )
Best Regards
Community Support Team _ chenwu zhuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.