Forum Discussion
How to change filter to include all selection?
Hi all. I'm trying to make a MTD/YTD KPI for a dashboard and I can't get the filter for the YTD to work.
Logic is as follows. I have a measure that takes the difference by line in the dataset.
I just set the filter in the visual for month 4 and MTD works fine. The measure would only apply for month 4.
However, when I was selecting everything 1 - 4. The YTD still only takes into account month 4 instead of 1 + 2 + 3 + 4.
Anyone have any advice?
1 Reply
- amitchandak
Super User
henryl , if you have date, the use date tbale prefer time intelligence or window function
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))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
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_0uAPower BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc