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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Need Help with Power BI Desktop

Hi Community,

 

Is there a way to control the no of rows considered in Power BI Aggregations based on Slicers selected in the visuals in the front end.

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, i created data to reproduce your scenario. The pbix file is attached in the end.

Table:

b1.png

 

Slicer:

b2.png

 

You may create a measure like below.

Aggregation Measure = 
IF(
    HASONEVALUE(Slicer[Aggregations]),
    SWITCH(
          SELECTEDVALUE(Slicer[Aggregations]),
          "Sum",SUM('Table'[Value]),
          "Average",AVERAGE('Table'[Value]),
          "Max",MAX('Table'[Value]),
          "Min",MIN('Table'[Value])
    )
)

 

Result:

b3.pngb4.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, i created data to reproduce your scenario. The pbix file is attached in the end.

Table:

b1.png

 

Slicer:

b2.png

 

You may create a measure like below.

Aggregation Measure = 
IF(
    HASONEVALUE(Slicer[Aggregations]),
    SWITCH(
          SELECTEDVALUE(Slicer[Aggregations]),
          "Sum",SUM('Table'[Value]),
          "Average",AVERAGE('Table'[Value]),
          "Max",MAX('Table'[Value]),
          "Min",MIN('Table'[Value])
    )
)

 

Result:

b3.pngb4.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , A table can not consider slicer value. This means a calculated table can not take slicer value

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
Anonymous
Not applicable

Can we use a measure or a calculated column to control the aggregations based on slicer value?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.