Forum Discussion

WestWinter's avatar
WestWinter
Helper II
6 years ago

How do I convert this Measure to a Calculated Column?

Z Measure = var mean = AVERAGEX(
    KEEPFILTERS(VALUES('R(All)'[Date])),
	CALCULATE(SUM('R(All)'[Value])))
var SD = 
STDEVX.S(
    KEEPFILTERS(VALUES('R(All)'[Date])),
	CALCULATE(SUM('R(All)'[Value])))
return (calculate(LASTNONBLANKVALUE('R(All)'[Date], sum('R(All)'[Value])))-mean)/SD

So my above Measure helps return the latest Z-Score according to latest date.

 

However, as I would need to plot a chart with the Z-Score, which I realize is not possible with the above measure. I would like to have it in a Calculated Column if possible; where each row will have its own Z-Score so as to show it in a nice graph of how the z-score changes.

2 Replies

  • v-xuding-msft's avatar
    v-xuding-msft
    Community Support

    Hi WestWinter ,

     

    Please share some sample data and your expected output. Then we can understand your requirement clearly and solve it quickly. It may not meet your needs that we convert the measure to calculated column just based on the current measure.