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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
devpp
New Member

Cumulative sum of columns/year

Hello Community,
How can I find the cumulative sum of Plan and Actual column for the coloured period (month_year) using DAX.

The below screenshot is from Excel. 

devpp_1-1739891910267.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @devpp,

If you want ot the cumulative causation cut off at the year end, I'd like to suggest add a condition to check the current year.
I modify the above formulas to add the filter condition on year to the two expressions:

Cumm Planned =
CALCULATE (
    SUM ( Table[Plan] ),
    FILTER (
        ALL ( Table ),
        Table[month_year] <= EARLIER ( Table[month_year] )
            && YEAR ( Table[month_year] ) = YEAR ( EARLIER ( Table[month_year] ) )
    )
)

Cumm Actual =
CALCULATE (
    SUM ( Table[Actual] ),
    FILTER (
        ALL ( Table ),
        Table[month_year] <= EARLIER ( Table[month_year] )
            && YEAR ( Table[month_year] ) = YEAR ( EARLIER ( Table[month_year] ) )
    )
)

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @devpp ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

bhanu_gautam
Super User
Super User

@devpp 

Cumulative Planned:
DAX
Cumm Planned =
CALCULATE(
SUM(Table[Plan]),
FILTER(
ALL(Table),
Table[month_year] <= EARLIER(Table[month_year])
)
)


Cumulative Actual:
DAX
Cumm Actual =
CALCULATE(
SUM(Table[Actual]),
FILTER(
ALL(Table),
Table[month_year] <= EARLIER(Table[month_year])
)
)

 

Table is the name of your table.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Hi bhanu_gautam,

The answer is close...here I need to find the cumulative for that year only...In this case it should stop at 172 when 2024 completes and then start fresh for 2025.

For 2025 in the control year it should start from 7 and end at 13

devpp_0-1739943203314.png

 

Anonymous
Not applicable

Hi @devpp,

If you want ot the cumulative causation cut off at the year end, I'd like to suggest add a condition to check the current year.
I modify the above formulas to add the filter condition on year to the two expressions:

Cumm Planned =
CALCULATE (
    SUM ( Table[Plan] ),
    FILTER (
        ALL ( Table ),
        Table[month_year] <= EARLIER ( Table[month_year] )
            && YEAR ( Table[month_year] ) = YEAR ( EARLIER ( Table[month_year] ) )
    )
)

Cumm Actual =
CALCULATE (
    SUM ( Table[Actual] ),
    FILTER (
        ALL ( Table ),
        Table[month_year] <= EARLIER ( Table[month_year] )
            && YEAR ( Table[month_year] ) = YEAR ( EARLIER ( Table[month_year] ) )
    )
)

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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