Forum Discussion
Sawtooth decay charts in Power BI
Hello!,
I am trying to create a cyclic graph in Power BI with a condition added upon it.
I have the following data structure.
| Day | Starting Amount | Safety Stock | Units per Day | Lot Size | On Hand Inventory |
| 0 | 800 | 550 | 30 | 200 | 800 |
| 1 | 800 | 550 | 30 | 200 | 770 |
| 2 | 800 | 550 | 30 | 200 | 740 |
| 3 | 800 | 550 | 30 | 200 | 710 |
| 4 | 800 | 550 | 30 | 200 | 680 |
| 5 | 800 | 550 | 30 | 200 | 650 |
| 6 | 800 | 550 | 30 | 200 | 620 |
| 7 | 800 | 550 | 30 | 200 | 590 |
| 8 | 800 | 550 | 30 | 200 | 560 |
| 9 | 800 | 550 | 30 | 200 | 730 |
| 10 | 800 | 550 | 30 | 200 | 700 |
The objective is to generate a decay curve with saw tooth like features. The starting on hand stock (800 units) decays at the rate of 30 units per day. The day on which it goes below the safety stock value, lot size number of units are added back to the system again. This cycle continues. The objective is to create a column like the last column (on hand inventory) which tracks these movements and shows the current on hand inventory at any given time.
The final graph created would look something like this. (The dotted lines should indicate the safety stock level in my case).
4 Replies
- lbendlin
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- AnonymousNot applicable
Edited the post as per your suggestion. Would be helpful if you have any leads for the solution
- lbendlin
Super User
You cannot create semi additive columns in Power BI. The only way to do this is in Power Query with List.Accumulate.
How many days in advance do you need to calculate?
What do you do with the chart once it is computed?