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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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
Anonymous
Not applicable

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
Anonymous
Not applicable

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.

Anonymous
Not applicable

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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