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