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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
likhithar
Helper III
Helper III

Need to sum the Cumulative Result using DAX

Hello All,

I have Month Column, I have some value till 202103(prevyr),I'm doing cumulative sum.On the top of that ,i need to cumulative to the cumulative result .As attached in the snap(how to achieve 55,300).Till 11,950 I'm able to achieve(using DAX Measure)

likhithar_0-1644901215930.png

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @likhithar ;

I tried to restore your original structure table and model as follows:

vyalanwumsft_0-1645169193587.png

 

Then creates a measure to calculate:

cumulative = 
var _sum=SUMMARIZE('Fact',[Month],"1", CALCULATE(SUM([Value]),FILTER(ALL('Fact'),[Month]<=MAX([Month]))))
return SUMX(_sum,[1])

The final output is shown below:

vyalanwumsft_1-1645169229718.png

If not right ,please correct me. 


Best Regards,
Community Support Team_ Yalan Wu
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

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @likhithar ;

I tried to restore your original structure table and model as follows:

vyalanwumsft_0-1645169193587.png

 

Then creates a measure to calculate:

cumulative = 
var _sum=SUMMARIZE('Fact',[Month],"1", CALCULATE(SUM([Value]),FILTER(ALL('Fact'),[Month]<=MAX([Month]))))
return SUMX(_sum,[1])

The final output is shown below:

vyalanwumsft_1-1645169229718.png

If not right ,please correct me. 


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Picture1.png

 

Value cumulate total fix: =
VAR newtable =
ADDCOLUMNS (
FILTER ( ALL ( Data ), Data[Month] <= MAX ( Data[Month] ) ),
"@cumulate", CALCULATE ( SUM ( Data[Value] ) )
)
VAR cumulateofall =
ADDCOLUMNS (
ALL ( Data ),
"@cumulateofall",
CALCULATE (
CALCULATE (
SUM ( Data[Value] ),
FILTER ( ALL ( Data ), Data[Month] <= MAX ( Data[Month] ) )
)
)
)
RETURN
IF (
HASONEVALUE ( Data[Month] ),
SUMX ( newtable, [@cumulate] ),
SUMX ( cumulateofall, [@cumulateofall] )
)


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

@Jihwan_Kim 
My financial Year starts from April and ends on March

likhithar_0-1644917089295.png

In my Fact Table ,MONTH is the time period,in reporting i'm using filters from DateTable which is FinYear and Month Name,If Connect DateTable and fact Table relationship will be Many-Many, to avoid that I created Calendar Bridge Table which is DISTINCT(DateTable[YYYYMM])
Relationship will be like
FactTable[Month]-Calendar[YYYYMM]
Calendar[YYYYMM]-DateTable[YYYYMM](Bidirectional Filtering)

amitchandak
Super User
Super User

@likhithar , You need have incremental month value 202103 is in sortable format at 1st then filter else

 

you need to create a rank

Rank = Rankx(filter(Table, Table[Month]<> 'Till 202103') ,[Month year], ,asc,dense)+1 

 

Then

new measure=

sumx(filter(allselected(Table), Table[Rank] <= Max(Table[Rank]) ), Table[Value])

 

new column =

sumx(filter((Table), Table[Rank] <= earlier(Table[Rank]) ), Table[Value])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors