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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
George1973
Helper V
Helper V

Stock Result based on previous day status

Hi All,

Here is a sample table of the specific item, calculating its stock (Yellos column) level per operation day:

 

George1973_0-1676369402614.png

 

Here is the data table:

Operation DayStockDaily DemnandShipment
0                152                 -   
1                12923 
2                10623 
3                  8323 
4                  6023 
5                  3723 
6                  1423 
7                   -  23 
8                   -  23 
9                   -  23 
10                  7723100
11                  5423 
12                  3123 
13                    823 
14                   -  23 
15                   -  23 
16                977231000
17                95423 
18                93123 
19                90823 
20                88523 

 

With the excel formula, calculating the stock level: =IF(B2-C3+D3>0,B2-C3+D3,0)

Note: It starts from day 1 only. Day 0 is the initial, starting stock.

 

I would like to have the calculated column in POwer BI, with the same results.

 

Thanks in advance,

 

 

 

 

 

1 REPLY 1
George1973
Helper V
Helper V

One clarification:
Idealy I would like to have this result table as a "Virtual Table" within the DAX code

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.