Forum Discussion
Chmielo
5 years agoFrequent Visitor
Calculations based on a specific value in the range
Hi, I need to create a column based on the difference from column "Value", and the average value of the date range given in slicer. For example: Actual Table Date Value 2021-01-01 5 20...
Fowmy
Super User
5 years agoChmielo
You can create a measure for this because a calculated column cannot access the values selected in the slicer.
New Value =
var _avg = CALCULATE( AVERAGE(Table1[Value]), ALLSELECTED(Table1[Date]) )
var _value =
AVERAGEX(
Table1,
(Table1[Value] - _avg ) ^ 2
)
return
_value