Forum Discussion
Help with What-if Parameter
Situation
I am trying to use a What-if parameter to shrink inventory by a certain percentage each month. This is so we can account for things like breakage or lost inventory. I have the parameter working, whereby it will apply a selected percentage and decrease the inventory, but it is seemingly does it uniformly across all months.
What I need:
I need this parameter to compound. Meaning, I need to reduce January inventory by .1% and then I need that take that new inventory number and use it as the inventory for February and reduce it by .1% for March, and so on throughout the year. Is there a way to make this compound in this way?
Here is the parameter currently:
Inventory With Variable Shrink Adjustment = CALCULATE(SUM('2019_Inventory and LE'[Actual and LE])) - CALCULATE(SUM('2019_Inventory and LE'[Actual and LE])) * CALCULATE(SUM(Shrink[Shrink]))
Thanks!
Hey,
please allow me to point you to this blog post
https://www.minceddata.info/2018/02/21/using-table-iterators-to-calculate-a-future-value/
Even if this is about calculating a gain, but this of course this can also be interpreted as a growing deduction.
This blog considers some additional twists, but I guess the present solution can be adapted to your needs.
Regards,
Tom
1 Reply
- TomMartens
Super User
Hey,
please allow me to point you to this blog post
https://www.minceddata.info/2018/02/21/using-table-iterators-to-calculate-a-future-value/
Even if this is about calculating a gain, but this of course this can also be interpreted as a growing deduction.
This blog considers some additional twists, but I guess the present solution can be adapted to your needs.
Regards,
Tom