Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not 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 with the view sum but with the view average the data will be 1 (7/7 days) 

image.png
1 ACCEPTED SOLUTION
ReneMoawad
Resolver III
Resolver 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])

)

View solution in original post

2 REPLIES 2
ReneMoawad
Resolver III
Resolver 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])

)

amitchandak
Super User
Super User

@Anonymous , Not very clear, You can create a sum or avg measure and then can create a field parameter or calculation group

 

https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd

 

Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.