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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jamuka
Helper IV
Helper IV

Running Total based on two value

Hello,

 

I'm using Power BI for the first time and I stucked in running totals. I need to sum my forecast amount based on stock location (Store, Warehouse and Without Stock).

 

I want to show running totals of each articles and for Store & Warehouse Locations.

 

 

Item NoStock LocationForecast AmountExpected Result
8Store1515
8Warehouse1515
7Warehouse1227
1Store1037
1Warehouse1037
5Store744
6Store650
2Without Stock5 
4Without Stock4 

 

 

Also when I do it based on forecast amount it sums same article twice, 

 

sample.jpg

 

RunningTotal_S+WS = 
VAR GT = Sheet1[Forecast Amount]
RETURN
SUMX (
FILTER (
Sheet1;
Sheet1[Forecast Amount]>= GT
);
Sheet1[Forecast Amount])

 

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@jamuka 

 

You may take a look at the following post.

https://community.powerbi.com/t5/Desktop/Running-Total-Through-Direct-Query/m-p/628353#M300215

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-chuncz-msft thank your your reply.

 

code in the link summarize forecast amount for all items based on min item no.

what I need is running total for forecast amount starting from max value based on stock locations of Store and Warehouse and once for each article. e.g item no "1" should be used once not twice.

Also could it be possible to have it as a column? As I understand measure and column formulas are different from each other.

 

regards

 

 sample2.jpg

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors