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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Filtering a bar chart by y-axis value

I have a Clusted column chart as shown, but I wanted to be able to filter to only one y axis value at a time using a slicer selection. I cannot use a slicer because all three values on the chart are calculated measures. Is it possible to do this?

dero_0-1656596693861.png

 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You need to have what-if parameter and based on that you can filter

 

You can have a measure like this or you can use this in visual lebel filter

 

measure =

var _max = minx(allselected(whatif), whatif[value])
var _min = maxx(allselected(whatif), whatif[value])

return

sumx(filter(Summarize(Fact, fact[Axis Col], Fact[Legend Col]) , [Measure] >=_min && [Measure] <= _max) , [Measure])

 

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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