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
vijaykumarj19
Employee
Employee

Cumulative total adding previous total twice

AxisActualCummulative  
a1555
a210205+5+10
a3155020+5+10+15
a42010050+5+10+15+20
a525175100+5+10+15+20+25

 

Required cummulative column 

1 ACCEPTED SOLUTION

@vijaykumarj19 I use below measures to get the output. Put [Total 1] in [Total 2].

Total 1 = SUMX(FILTER(ALL('Tbl3'),'Tbl3'[Axis]<=MAX('Tbl3'[Axis])),'Tbl3'[Value])
Total 2 = SUMX(FILTER(ALL('Tbl3'),'Tbl3'[Axis]<=MAX('Tbl3'[Axis])),[Total 1])

021602.jpg

I am struggling to get the output with only one measure but haven't figured it out.

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@vijaykumarj19 , Try a measure like

 

calculate(sum(Table[Actual]), filter(allselected(Table), [Axis] < max(Table[Axis]))) + sum(Table[Actual])

Current value is summing up with previous cummulative 
But it should be added like below

 

vijaykumarj19_0-1612514378362.png

 

Hi @vijaykumarj19 , please try below measures.  Cumulative Total 3 is what you need.

Cumulative Total 1 = CALCULATE(SUM(Tbl2[Value]),FILTER(ALL(Tbl2),Tbl2[Axis]<=MAX(Tbl2[Axis])))
Cumulative Total 2 = CALCULATE(SUMX(VALUES(Tbl2[Axis]),[Cumulative Total 1]),FILTER(ALL(Tbl2),Tbl2[Axis]<=MAX(Tbl2[Axis])))
Cumulative Total 3 = CALCULATE(SUMX(VALUES(Tbl2[Axis]),[Cumulative Total 2]),FILTER(ALL(Tbl2),Tbl2[Axis]<=MAX(Tbl2[Axis])))

 020904.jpg

Kindly let me know if this helps.
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

AxisValueOutput 
155
21020
31550
420100
525175

 Output :-
5 = Val1(5)

20 =output1(5) + Val1(5)+val2(10)

50 = output2(20) + Val1(5)+val2(10)+val3(15)

.

.

Required output field 

Can i get a measure for above requirement  

@vijaykumarj19 I use below measures to get the output. Put [Total 1] in [Total 2].

Total 1 = SUMX(FILTER(ALL('Tbl3'),'Tbl3'[Axis]<=MAX('Tbl3'[Axis])),'Tbl3'[Value])
Total 2 = SUMX(FILTER(ALL('Tbl3'),'Tbl3'[Axis]<=MAX('Tbl3'[Axis])),[Total 1])

021602.jpg

I am struggling to get the output with only one measure but haven't figured it out.

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.