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