Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
hudsonvj
Frequent Visitor

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.

 

safra.png

 

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?

Soma ano anterior.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super 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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super 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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.