Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 nextMon = currentMonth + 1
var valInt = CALCULATE(SUM(MyTable[Value]),MyTable[ValQuarter] = currentQuarter, MyTable[Month] = nextMon, MyTable[ValYear] = currentYear,MyTable[ID] = IDSelected)
var valInt1 = CALCULATE(([Ratio Factor]),MyTable[ValQuarter] = currentQuarter, MyTable[Month] = nextMon, MyTable[ValYear] = currentYear,MyTable[ID] = IDSelected)
var valInt2 = CALCULATE(([Current Month Proj]),MyTable[ValQuarter] = currentQuarter, MyTable[Month] = nextMon, MyTable[ValYear] = currentYear,MyTable[ID] = IDSelected)
var valNextTemp = (valInt / valInt1) + valInt2
var valNext = (valNextTemp / [Ratio Factor]) + [Current Month Proj]
return valNext
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).
Proud to be a Super User!
@vanessafvg ,pls see below what I am trying to do :
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 )
Hope this helps..
A1 A2 A3 A4
=A2/ Table Col1 + Table Col7 | =A3 / Table Col1 + Table Col7 | =A4 /Table Col1 + Table Col7 | =A5/Table Col1 + Table Col7 |
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |