topic Re: Help with a measure in DAX. in Desktop
https://community.powerbi.com/t5/Desktop/Help-with-a-measure-in-DAX/m-p/1397486#M593420
<P><LI-USER uid="12123"></LI-USER> ,pls see below what I am trying to do :</P><P> </P><P>I cannot share my dataset but lemme show you some sample calcs -</P><P> </P><P>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</P><P>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 ) </P><P> </P><P>Hope this helps..</P><P> </P><P> A1 A2 A3 A4</P><TABLE border="1"><TBODY><TR><TD>=A2/ Table Col1 + Table Col7</TD><TD>=A3 / Table Col1 + Table Col7</TD><TD>=A4 /Table Col1 + Table Col7 </TD><TD>=A5/Table Col1 + Table Col7</TD></TR></TBODY></TABLE>Sun, 27 Sep 2020 14:36:39 GMThdavidson2020-09-27T14:36:39ZHelp with a measure in DAX.
https://community.powerbi.com/t5/Desktop/Help-with-a-measure-in-DAX/m-p/1397365#M593391
<P>This one is a little tricky & has me pulling my hair out.</P><P> </P><P>TestMeasure =<BR />var currentMonth = SELECTEDVALUE(MyTable[Month])<BR />var currentYear = SELECTEDVALUE(MyTable[ValYear])<BR />var currentQuarter = SELECTEDVALUE(MyTable[ValQuarter])<BR />var IDSelected = SELECTEDVALUE(MyTable[ID])</P><P>var nextMon = currentMonth + 1</P><P>var valInt = CALCULATE(SUM(MyTable[Value]),MyTable[ValQuarter] = currentQuarter, MyTable[Month] = nextMon, MyTable[ValYear] = currentYear,MyTable[ID] = IDSelected)<BR />var valInt1 = CALCULATE(([Ratio Factor]),MyTable[ValQuarter] = currentQuarter, MyTable[Month] = nextMon, MyTable[ValYear] = currentYear,MyTable[ID] = IDSelected)<BR />var valInt2 = CALCULATE(([Current Month Proj]),MyTable[ValQuarter] = currentQuarter, MyTable[Month] = nextMon, MyTable[ValYear] = currentYear,MyTable[ID] = IDSelected)</P><P>var valNextTemp = (valInt / valInt1) + valInt2<BR />var valNext = (valNextTemp / [Ratio Factor]) + [Current Month Proj]</P><P>return valNext</P><P> </P><P>The measure that I have created above works fine for the first pass. (i.e. when my month selection is 1)</P><P>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.<BR />i.e. for my month selection 2, the valInt should be equal to the valNext value (when the month selection was 1).</P><P>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.</P><P> </P><P>My months are in a column & go right upto 240 (i.e. 2 years of data).</P>Sun, 27 Sep 2020 11:07:01 GMThttps://community.powerbi.com/t5/Desktop/Help-with-a-measure-in-DAX/m-p/1397365#M593391hdavidson2020-09-27T11:07:01ZRe: Help with a measure in DAX.
https://community.powerbi.com/t5/Desktop/Help-with-a-measure-in-DAX/m-p/1397448#M593410
can i ask what your objective is, what are you trying to do?<BR />Sun, 27 Sep 2020 13:59:53 GMThttps://community.powerbi.com/t5/Desktop/Help-with-a-measure-in-DAX/m-p/1397448#M593410vanessafvg2020-09-27T13:59:53ZRe: Help with a measure in DAX.
https://community.powerbi.com/t5/Desktop/Help-with-a-measure-in-DAX/m-p/1397486#M593420
<P><LI-USER uid="12123"></LI-USER> ,pls see below what I am trying to do :</P><P> </P><P>I cannot share my dataset but lemme show you some sample calcs -</P><P> </P><P>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</P><P>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 ) </P><P> </P><P>Hope this helps..</P><P> </P><P> A1 A2 A3 A4</P><TABLE border="1"><TBODY><TR><TD>=A2/ Table Col1 + Table Col7</TD><TD>=A3 / Table Col1 + Table Col7</TD><TD>=A4 /Table Col1 + Table Col7 </TD><TD>=A5/Table Col1 + Table Col7</TD></TR></TBODY></TABLE>Sun, 27 Sep 2020 14:36:39 GMThttps://community.powerbi.com/t5/Desktop/Help-with-a-measure-in-DAX/m-p/1397486#M593420hdavidson2020-09-27T14:36:39ZRe: Help with a measure in DAX.
https://community.powerbi.com/t5/Desktop/Help-with-a-measure-in-DAX/m-p/1398589#M593670
if you can provide some dummy data that would be useful.Mon, 28 Sep 2020 08:06:20 GMThttps://community.powerbi.com/t5/Desktop/Help-with-a-measure-in-DAX/m-p/1398589#M593670vanessafvg2020-09-28T08:06:20Z