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
johnnychallita
New Member

Running Total of a Measure based on Another sorted measure

Hello,

I am having trouble creating a new measure (Cumulative share) of running total for Measure 2 (Share %) based on lowest to highest Measure 1 (INDEX).

can someone please help?

 

Thank you so much

 

 Measure 1Measure 2Running total needed
ItemIndex (SORTED)ShareCumulative share
A793%3%
B844%7%
C9023%30%
D10045%75%
E13020%95%
F1503%98%
G2002%100%
4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi, @johnnychallita 

Please check the below picture and the sample pbix file's link down below.

All measures are in the sample pbix file, and all steps are numbered in front of each measure.

 

Picture6.png

 

https://www.dropbox.com/s/n73y6w2telmul02/johnnychallita.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

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

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

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.


Go to My LinkedIn Page


Hi @Jihwan_Kim ,
Thank you for your reply. 
please note that I wasn't able to use your solution since the index and the share columns are both measures. I can't create  a new table as it has to be dynamic inside the Cumulative Measure.

amitchandak
Super User
Super User

@johnnychallita , check if this measure can work( I have not tested this)

 

measure =
var _tab = summzarize(Table,Table[Item], "_1", [measure1], "_2",[Meausre2])
return
sumx(filter(_tab, [_1] <= Maxx(_tab,[_1])),[_2])

Dear @amitchandak ,

Thank you so much for getting back to me. Please note that your solution didn't work out as I still receive [_2] values as a result instead of a rolling sum. is there any other solution? 
Thank you!

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.

Top Solution Authors