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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Jacques_N
Frequent Visitor

running sum of a measure

Hello to all,

 

In order to affect a class to a product I need to make a running total of a sorted table:

table.PNG

Whath I have in power bi are the colums in green (of course unsorted I did it in excel), an what I would like to get is the runing sum in red colum, and that for one key. As soon as the key change power BI has to restart the process.

 

Thanks for your help.

Regards

Jacques

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

Hi @Jacques_N

Assume [weight] is a column

create a measure as below

running sum = CALCULATE(SUM(Sheet1[column]),FILTER(ALLEXCEPT(Sheet1,Sheet1[key]),[plant]>=MAX([plant])))

1.png

 

Assume [weight] is a measure

create a measure as below

running sum 2 = SUMX(FILTER(ALLEXCEPT(Sheet1,Sheet1[key]),[plant]>=MAX([plant])),[Measure])

2.png

 

Best Regards

Maggie

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Jacques_N

Assume [weight] is a column

create a measure as below

running sum = CALCULATE(SUM(Sheet1[column]),FILTER(ALLEXCEPT(Sheet1,Sheet1[key]),[plant]>=MAX([plant])))

1.png

 

Assume [weight] is a measure

create a measure as below

running sum 2 = SUMX(FILTER(ALLEXCEPT(Sheet1,Sheet1[key]),[plant]>=MAX([plant])),[Measure])

2.png

 

Best Regards

Maggie

Hi Maggie,

 

Thanks a lot, basically taht working very wellMan Happy, with a limited extraction of my database. But my whole dataset is nealy 1.5 M rows, and then I get "Not enough memory"Man Frustrated.

I will try to separate this calculation in a separate powerBI .

 

Thanks a lot,

 

Jacques

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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