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
jamuka
Advocate II
Advocate II

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