Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi All,
Here is a sample table of the specific item, calculating its stock (Yellos column) level per operation day:
Here is the data table:
| Operation Day | Stock | Daily Demnand | Shipment |
| 0 | 152 | - | |
| 1 | 129 | 23 | |
| 2 | 106 | 23 | |
| 3 | 83 | 23 | |
| 4 | 60 | 23 | |
| 5 | 37 | 23 | |
| 6 | 14 | 23 | |
| 7 | - | 23 | |
| 8 | - | 23 | |
| 9 | - | 23 | |
| 10 | 77 | 23 | 100 |
| 11 | 54 | 23 | |
| 12 | 31 | 23 | |
| 13 | 8 | 23 | |
| 14 | - | 23 | |
| 15 | - | 23 | |
| 16 | 977 | 23 | 1000 |
| 17 | 954 | 23 | |
| 18 | 931 | 23 | |
| 19 | 908 | 23 | |
| 20 | 885 | 23 |
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,
One clarification:
Idealy I would like to have this result table as a "Virtual Table" within the DAX code
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |