Forum Discussion
Specific Calendar
Good afternoon people.
I have a measure that makes a cumulative sum with the previous months. What happens is that I have my specific year, example: 04/01/20 - 03/31/21 = Year 2020; 04/01/21 - 03/31/22 = Year 2021; 04/01/22 - 03/31/23 = Year 2022 and so on. For the calculation I used the measure (calculate+datesytd). And Datesytd respects the calendar year. So she is adding up the months from January to March 2022, which in MY year corresponds to the year 2021.
And consequently it will not add the months from January to March 2023, due to this fact of considering the calendar year.
As a way to identify my year, I created the calculated column "Safra" that specifies the year for my informed periods. However, it still doesn't work.
To illustrate as an example, I made a filter for the year 2022, year of the calculated column I created, as in the image below.
The months of April and May must be set to zero, as the values returned refer to January, February, and March 2022, which in my year corresponds to the year 2021 as already mentioned.
Has anyone done anything along these lines?
hudsonvj , Have you tried Datesytd like
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"3/31"))
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
1 Reply
- amitchandakSuper User
hudsonvj , Have you tried Datesytd like
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"3/31"))
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