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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
chinex
New Member

Measure logic that deals with multiple selection on slicer

Hi all, this is the issue I have. The measure shows a ratio value based on both selecting a ratio and a range. In the below screenshot i have selected "90%-100%" range, so it works perfectly as long as the user only makes one selection. But if multiple selections are done, i'm not sure how to deal with that in the red section below:

 

Y Axis Ratio Value =
IF(HASONEVALUE('Y Ratio Ranges'[Y Ratio Ranges]),
CALCULATE(
AVERAGE('MAIN -Long Bar Consol SS ShkO Trend'[Value]),
FILTER('MAIN -Long Bar Consol SS ShkO Trend','MAIN -Long Bar Consol SS ShkO Trend'[Ratio] = [Y Axis Selected Ratio]),
FILTER('MAIN -Long Bar Consol SS ShkO Trend','MAIN -Long Bar Consol SS ShkO Trend'[Ratio Ranges] = [Y Axis Selected Ratio Range])
),
CALCULATE(
AVERAGE('MAIN -Long Bar Consol SS ShkO Trend'[Value]),
FILTER('MAIN -Long Bar Consol SS ShkO Trend','MAIN -Long Bar Consol SS ShkO Trend'[Ratio] = [Y Axis Selected Ratio])
)
)

chinex_0-1632867676590.png

thanks!

1 REPLY 1
VahidDM
Super User
Super User

Hi @chinex 

 

Are those [Y Axis Selected Ratio] and [Y Axis Selected Ratio Range] from MAIN -Long Bar Consol SS ShkO Trend table?

If yes, just use this measure:

Y Axis Ratio Value =
AVERAGE('MAIN -Long Bar Consol SS ShkO Trend'[Value])

 

When you select items on the slicer, it will filter your table and you don't need to add filter to your measure.

 

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

Appreciate your Kudos!!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.