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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.