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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
timurcakin
Helper I
Helper I

Running sum % help needed (from calculate)

Hello,

 

I am not very good at dax but need this for my work so appreciate if you can help with the request.

can you please help to calculate the running total of weighted volume % for attached file?

 

TEST- Copy.pbix

 

i am trying to find the "running total weighted volume %, its pretty easy to do it on excel, 

unfortunately data coming from measure so it makes calculation harder. 

 

itemqtyordervolumvolume %running total weighted volume%
ZUB1379-LED126617477792495.77% 95.77%
ZUB1380-LED42714299883.69% 99.46%
ZUB1378-LED2217638720.48% 99.94%
ZUB137910404000.05%  99.99%
ZUB1378612720.01%  99.99%
ZUB1396850248320.00%  100.00%
ZUB138044160.00%  100.00%

 

thanks in advance.

timur

1 ACCEPTED SOLUTION

Hi @timurcakin ,

 

The last formula I gave was to accumulate in descending order by [No_], I have since realised that you may want to accumulate in descending order by [Order], please try this measure.

running total weighted volume% = 
VAR _order = [order]
VAR _result = SUMX(FILTER(SUMMARIZE(ALLSELECTED('Sheet3'),'Sheet3'[No_],"OD",[order]),[OD]>=_order),[weighted vol %])
RETURN
_result

vcgaomsft_0-1675733274804.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

6 REPLIES 6
v-cgao-msft
Community Support
Community Support

Hi @timurcakin ,

 

Please try:

running total weighted volume% = SUMX(FILTER(ALLSELECTED('Sheet3'[No_]),'Sheet3'[No_]<=SELECTEDVALUE('Sheet3'[No_])),[weighted vol %])

vcgaomsft_0-1675390976969.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Hello Gao,

sorry for the late reply i was away. 

i think the formula you have provided is taking the running total of weigted vol by sorting out items, not weigted volumes. 😞

timurcakin_0-1675722157751.png

 

 

 

Hi @timurcakin ,

 

The last formula I gave was to accumulate in descending order by [No_], I have since realised that you may want to accumulate in descending order by [Order], please try this measure.

running total weighted volume% = 
VAR _order = [order]
VAR _result = SUMX(FILTER(SUMMARIZE(ALLSELECTED('Sheet3'),'Sheet3'[No_],"OD",[order]),[OD]>=_order),[weighted vol %])
RETURN
_result

vcgaomsft_0-1675733274804.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Hey Gao,

AMAZING thank you soooo much for this!

Seems very complex (for me :)) but you managed to sort it out  so thank you very much for helping me.

all the best!

Greg_Deckler
Super User
Super User

@timurcakin Better Running Total - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

if i understand correctly your calculations are coming from a table whereas my numbers are part of a measure 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.