Forum Discussion
Anonymous
7 years agoNot applicable
Rolling Subtraction from Fixed Inventory Value
I'm attempting to get the remaining inventory function to return the total inventory from the previous month minus the forecasted sales from the previous month. October and November are correct, howe...
- 7 years ago
Hi Anonymous ,
You can add the index column using query editor firstly, and then add the measures below:
Measure = IF(MAX('Table'[Index])=0,0,CALCULATE(MAX('Table'[Forecasted sales]),FILTER(ALL('Table'),[Index]=MAX('Table'[Index])-1)))Measure 2 = 178-CALCULATE(SUMX('Table',[Measure]),FILTER(ALL('Table'),[Month]<=MAX('Table'[Month])))Pbix attached: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EQ__7Plc54lMtqm3_xzXLZ4BA-WddcSgisEuZGpDFPXuuQ?e=YxVoHG
v-diye-msft
7 years agoCommunity Support
Hi Anonymous ,
You can add the index column using query editor firstly, and then add the measures below:
Measure = IF(MAX('Table'[Index])=0,0,CALCULATE(MAX('Table'[Forecasted sales]),FILTER(ALL('Table'),[Index]=MAX('Table'[Index])-1)))Measure 2 = 178-CALCULATE(SUMX('Table',[Measure]),FILTER(ALL('Table'),[Month]<=MAX('Table'[Month])))Pbix attached: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EQ__7Plc54lMtqm3_xzXLZ4BA-WddcSgisEuZGpDFPXuuQ?e=YxVoHG
- v-diye-msft7 years agoCommunity Support
Hi Anonymous ,
If my above post helps, could you please consider Accept it as the solution to help the other members find it more quickly. thanks!
Best regards,
Dina Ye