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
dnimand
Regular Visitor

Need help: is it possible to hide/show content in a visual based on selection in the legend?

As stated in the subject I'm looking for a way to show/hide content in my visual based on the selection in the legend items.

When clicking legend items it will highlight the content in the visual and dim down the non selected content.

But is it possible to completely hide the content not selected in the legend?

I have purchased a visual from Xviz (multiple axis chart) which has a solution, but the problem in this visual is that it will reset any legend selection made when slicing/filtering in other parts of the report page 😞

In the example below I have clicked Meas 7 in legend and would like the graph to show only Meas 7 data. So clicking on the legend items should show/hide data in graph.

visual-selected-legend-item

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

Hi, @dnimand 

 

Based on my test, it is unsupported to hide/show content in a visual based on selection in the legend. The legend selectable items are based on other slicers and filters. I'd like to suggest you  contact the author for further help.

 

Best Regards

Allan

 

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

mahoneypat
Employee
Employee

Are you aware of the Edit Interactions feature to prevent unwanted visual interactions?

Change how visuals interact in a report - Power BI | Microsoft Docs

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hi,

 

Yes I am familiar with the interaction feature. That will not solve my issue since the slicer needs to impact my visual.

Here is an example of the xviz visual. Two legend items are selected as default (O and S2). All other data is hidden in the visual.

xviz default legend.jpg

When I click any of the other legend items it will show the corresponding data as well in the visual. This is exactly what I need!

BUT, the problem is that as soon as I use a slicer or do any filtering from other parts of my report the current selected legend items will reset to the default (in this case as above image). I have tried asking xviz if it's possible to "lock" the selection - but it's not possible in their visual...

So now I'm trying to figure out if there is another way of doing it.xviz extra legend item chosen.jpg

Thank you for reading/commenting!

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.