Forum Discussion
Marc_S
7 years agoRegular Visitor
Help Measure designed to average a column based on the distinct values is not working
test = CALCULATE(AVERAGE(CurrentDateTable[WIPDev2]),VALUES(CurrentDateTable[WIPAvgDev])) The goal is to take the WIPDev2 column and average it only when there is a unique value in WIPAvgDev colu...
- 7 years agoI did a bit of searching and found my answer Ill leave it up for others
test = AVERAGEX(Values(CurrentDateTable[WIPAvgDev]), CALCULATE(AVERAGE(CurrentDateTable[WIPDev2])))
TomMartens
Super User
7 years agoHey,
I guess this measure will do what you want:
test =
var theValues = VALUES(CurrentDateTable[WIPAvgDev]
var NoOfValues = COUNTROWS(theValues)
return
DIVIDE(
SUMX(
theVALUES
, CALCULATE(AVERAGE(CurrentDateTable[WIPDev2]))
)
, NoOfValues
)
Hopefully this is what you are looking for.
Regards,
Tom