Forum Discussion
Anonymous
3 years agoNot applicable
Create sum and average slicer
Hi everyone, i would like to create a slicer including 2 options sum and average like this so that when i need to see the group by of my data by sum or average. For example in a week the data is 7 wi...
- 3 years ago
Hi,
I believe you already created the table Aggregation including 2 rows (Sum and Avg)
Now you need to create a new Measure like the below:
Aggregation Measure =
Var selectedAgg = SELECTEDVALUE(AggregationTable[Aggregation])
ReturnIF(
selectedAgg = "Sum"
, SUM(Table[Amount])
, AVERAGE(Table[Amount])
)
ReneMoawad
3 years agoResolver III
Hi,
I believe you already created the table Aggregation including 2 rows (Sum and Avg)
Now you need to create a new Measure like the below:
Aggregation Measure =
Var selectedAgg = SELECTEDVALUE(AggregationTable[Aggregation])
Return
IF(
selectedAgg = "Sum"
, SUM(Table[Amount])
, AVERAGE(Table[Amount])
)