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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

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])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

Top Kudoed Authors