2 Replies Latest reply on Jan 14, 2019 10:45 AM by Alysse Mea

Subtract assigned value to each month

Help please! I have this view below. I need to subtract a value from each month. So my Nov 2018 is fixed at 120,000,000,000. Then Dec 2018 is 120,000,000,000 - 22,559,948,212=97,440,051,788. Jan 2019 is 97,440,051,788-14,034470 and so on. I was thinking this is a lookup function but can't figure it out. I attached my 10.5 workbook. Thank you! I need my final view to look like this:

• 1. Re: Subtract assigned value to each month

Alysse,

I would like  to validate your logic.

In Dec you compute 120M minus  the November value,  but  in  Jan  you compute  the resulting value minus the January value.  So in one case it's the previous value minus the previous month and in the other case it's the previous value minus the current month.

In the attached, I used the  lookup function along with the Previous_value  function  to get the numbers if you need to substract the previous month.

if first() = 0  then [Constant]

else PREVIOUS_VALUE(0) - LOOKUP( SUM([Sum]),-1 )

end

It may need some adjustment depending on what exactly you want.

1 of 1 people found this helpful
• 2. Re: Subtract assigned value to each month

Thank you so much Michel! Exactly what I needed.