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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Cumulative annual change

Hello!

I would need help to know how I can achieve the annual cumulative formula.

And what I need is to make a cumulative where I leave a fixed base month, for the cumulative of 2023 it has to take December 2022 as a base

With the DATESYTD measure, it allows me but compares me month to month, it took me October 2022-October 2023

Does anyone know how I could do it?

Thank you

1 ACCEPTED SOLUTION

Hi @Maurosaa93 ,

Have you solved your problem?
If you must need use measure, you can modify DAX as follows:

_Value1 = 
VAR CurrentYear = YEAR(MAX('Table'[Y-M]))
VAR CurrentMonth = MONTH(MAX('Table'[Y-M]))
RETURN
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        ALL('Table'),
        (YEAR('Table'[Y-M]) = CurrentYear && MONTH('Table'[Y-M]) <= CurrentMonth) || (YEAR('Table'[Y-M]) = CurrentYear - 1 && MONTH('Table'[Y-M]) = 12)
    )
)

The output is the same:

vjunyantmsft_0-1710398712021.png

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-junyant-msft
Community Support
Community Support

Hi @Maurosaa93 ,

If I understand you correctly, you want to do monthly accruals and restart accruals across years using December of the previous year as the starting data. Please try this way.
Here is my sample data:

vjunyantmsft_0-1709692552649.png

Use this DAX to create a calculated column:

_Value = 
VAR CurrentYear = YEAR('Table'[Y-M])
VAR CurrentMonth = MONTH('Table'[Y-M])
RETURN
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        ALL('Table'),
        (YEAR('Table'[Y-M]) = CurrentYear && MONTH('Table'[Y-M]) <= CurrentMonth) || (YEAR('Table'[Y-M]) = CurrentYear - 1 && MONTH('Table'[Y-M]) = 12)
    )
)

And the final output is as below:

vjunyantmsft_1-1709692602381.png


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Maurosaa93 ,

Have you solved your problem?
If you must need use measure, you can modify DAX as follows:

_Value1 = 
VAR CurrentYear = YEAR(MAX('Table'[Y-M]))
VAR CurrentMonth = MONTH(MAX('Table'[Y-M]))
RETURN
CALCULATE(
    SUM('Table'[Value]),
    FILTER(
        ALL('Table'),
        (YEAR('Table'[Y-M]) = CurrentYear && MONTH('Table'[Y-M]) <= CurrentMonth) || (YEAR('Table'[Y-M]) = CurrentYear - 1 && MONTH('Table'[Y-M]) = 12)
    )
)

The output is the same:

vjunyantmsft_0-1710398712021.png

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AmiraBedh
Super User
Super User

Can you please share your data or your model ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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