This one is a little tricky & has me pulling my hair out.
TestMeasure = var currentMonth = SELECTEDVALUE(MyTable[Month]) var currentYear = SELECTEDVALUE(MyTable[ValYear]) var currentQuarter = SELECTEDVALUE(MyTable[ValQuarter]) var IDSelected = SELECTEDVALUE(MyTable[ID])
var valNextTemp = (valInt / valInt1) + valInt2 var valNext = (valNextTemp / [Ratio Factor]) + [Current Month Proj]
The measure that I have created above works fine for the first pass. (i.e. when my month selection is 1)
However, for the next pass, I need to have the starting point (valNextTemp) i.e. the numerator to be the result of the calculation in my previous iteration. i.e. for my month selection 2, the valInt should be equal to the valNext value (when the month selection was 1).
e.g. in my first iteration of my valNext value was 1359916, in my next iteration the value of valNextTemp should be 1359916 & not the starting point value.
My months are in a column & go right upto 240 (i.e. 2 years of data).
I cannot share my dataset but lemme show you some sample calcs -
so as we see below, my A4 cell will be A5 (lets say there is no value) so it will be (zero divided by Col1 = 0) + Col7 = Col7
Now, the starting point for calculating the value in A3 cell will be the value in A4 (i.e. the numerator will be the answer of the calculation in cell A4) and so on i.e for A2 the starting point will be the value in the A3 cell (i.e. result of A4 /Table Col1 + Table Col7 )