Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I use the formula below form my YTD-1 but since I have updates my calender not only with past date but also with future dates because I am also including future sales in my view my YTD is not correct. How can I adjust the formula that my YTD only takes into account the date until today?
Solved! Go to Solution.
Hi ddijstelbloem,
You could try below measure to calculate YTD(2019,1,1-today)
Measure 2 = SUM('calendar'[Column])
ytd = CALCULATE ( TOTALYTD ( [Measure 2], 'calendar'[Date], FILTER ( ALL ( 'calendar' ), 'calendar'[Date] <= TODAY () && YEAR ( 'calendar'[Date] ) = YEAR(TODAY()) ) ) )
YTD-1(2018,1,1-2018,9,6 (previous year of today))
ytd-1 = CALCULATE ( TOTALYTD ( [Measure 2], 'calendar'[Date], FILTER ( ALL ( 'calendar' ), DATEADD('calendar'[Date] ,1,year)<= TODAY () && YEAR ( 'calendar'[Date] ) = YEAR(TODAY())-1 ) ) )
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ddijstelbloem,
You could try below measure to calculate YTD(2019,1,1-today)
Measure 2 = SUM('calendar'[Column])
ytd = CALCULATE ( TOTALYTD ( [Measure 2], 'calendar'[Date], FILTER ( ALL ( 'calendar' ), 'calendar'[Date] <= TODAY () && YEAR ( 'calendar'[Date] ) = YEAR(TODAY()) ) ) )
YTD-1(2018,1,1-2018,9,6 (previous year of today))
ytd-1 = CALCULATE ( TOTALYTD ( [Measure 2], 'calendar'[Date], FILTER ( ALL ( 'calendar' ), DATEADD('calendar'[Date] ,1,year)<= TODAY () && YEAR ( 'calendar'[Date] ) = YEAR(TODAY())-1 ) ) )
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
95 | |
83 | |
70 | |
66 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |