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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
sachin_005
New Member

Subject-Based Conditional Visualization

Description of the Issue:

I am trying to implement conditional visualizations in Power BI based on the selected Subject, and dynamically update the Slicer based on the selected Device from a Matrix.

Scenario Details:

  1. Structure:
    • The Service Centre/Customer/Device field is placed in a Matrix.
    • The Subject field is placed in a Slicer.
  2. Behaviour Requirements:
    • When a Device (e.g., ‘Device-1’ or ‘Device-2’) is selected in the Matrix, the Subject Slicer should dynamically update to show only the subjects related to the selected device.
    • On selecting ‘Subject-1’ → It should display a Graph.
    • On selecting ‘Subject-2’ → It should display a Graph + Table.
    • On selecting ‘Subject-3’ → It should display a Table.
  3. Devices:
    • There are two devices: ‘Device-1’ and ‘Device-2’.
    • Each device has multiple associated Subjects.

Challenge:

I am unable to configure Power BI to:

  1. Dynamically show or hide visuals (Graph/Table) based on the selected Subject in the Slicer.
  2. Dynamically filter the Subject Slicer to show relevant subjects based on the Device selected in the Matrix.

What I’ve Tried:

  1. Used Bookmarks with buttons to switch between views manually, but it doesn’t integrate well with the Slicer selections.
  2. Tried creating Measures to conditionally display visuals, but I am stuck with dynamically hiding/showing the Graph and Table based on the selected Subject.

Attempted to set up Cross-Filtering between the Matrix and the Slicer, but the slicer doesn’t update based on Matrix selection.

2 REPLIES 2
rohit1991
Super User
Super User

To achieve conditional visualization and dynamic slicer filtering:

  1. Dynamic Slicer Filtering:

    • Ensure a relationship exists between Device and Subject.
    • Enable cross-filtering via Edit Interactions in Power BI, so the slicer updates based on the Matrix selection.
  2. Show/Hide Visuals:

    • Create a Measure for each visual (Graph/Table) using IF conditions based on the selected Subject:
    • ShowGraph = IF(SELECTEDVALUE(SubjectTable[Subject]) = "Subject-1", 1, 0)
    • Set visual-level filters: Show visuals only when the measure equals 1.

Bookmarks Alternative:Use bookmarks with dynamic buttons for a manual toggle if needed.

Reference: Conditional Formatting and Dynamic Filtering in Power BI

Uzi2019
Super User
Super User

Hi @sachin_005 

 

1st scenario:
You cant filter the slicer with Matrix selection of Device.  Your slicer wont affect/filter with Matrix selection. 

 

2nd scenaro:

use slicer with Bookmark option .check this video

https://www.youtube.com/watch?v=4de5dqZRXzc

 

https://www.youtube.com/watch?v=_HTF7Ph7Eqc&t=342s

https://www.youtube.com/watch?v=czq-HRFQRnc

 

try these videos.. I hope it might help you to create slicer with bookmark

 

I hope I answered your question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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