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
adoster
Resolver I
Resolver I

Show Parameters across 2 visuals using 1 Slicer

I have a visual which shows Height and Weight values for "Count" and "Compliance%" using the following code

 

ComplianceCount = {
    ("Count", NAMEOF('Metrics'[CountHeight]), 0, "Height"),
    ("Compliance", NAMEOF('Metrics'[ComplianceHeight]), 1, "Height"),
    ("Count", NAMEOF('Metrics'[CountWeight]), 2, "Weight"),
    ("Compliance", NAMEOF('Metrics'[ComplianceWeight]), 3, "Weight")
}
 
I would like to separate this into 2 visuals so that if I select on the Slicer Height it will show Count on 1st visual and Compliance on 2nd visual. Same for selecting Slicer Weight value.
 
Thank you!
1 ACCEPTED SOLUTION
adoster
Resolver I
Resolver I

I was able to work out a solution to this.

 

Step 1: Create a reference table

DimCompliance =
DATATABLE(
    "MeasureName",STRING,
    "ID",INTEGER,
    {
        {"Height",1},
        {"Weight",2},
    }
)


Step 2: Create 2 Switch Measures

CountSwitch =
SWITCH (
    SELECTEDVALUE ( DimCompliance[ID] ),
    1, [CountHeight],
    2, [CountWeight]
)
 
 
ComplianceSwitch =
SWITCH (
    SELECTEDVALUE ( DimCompliance[ID] ),
    1, [ComplianceHeight],
    2, [ComplianceWeight]
)
 
Step 3: Create 2 visuals using Switch Measures

View solution in original post

1 REPLY 1
adoster
Resolver I
Resolver I

I was able to work out a solution to this.

 

Step 1: Create a reference table

DimCompliance =
DATATABLE(
    "MeasureName",STRING,
    "ID",INTEGER,
    {
        {"Height",1},
        {"Weight",2},
    }
)


Step 2: Create 2 Switch Measures

CountSwitch =
SWITCH (
    SELECTEDVALUE ( DimCompliance[ID] ),
    1, [CountHeight],
    2, [CountWeight]
)
 
 
ComplianceSwitch =
SWITCH (
    SELECTEDVALUE ( DimCompliance[ID] ),
    1, [ComplianceHeight],
    2, [ComplianceWeight]
)
 
Step 3: Create 2 visuals using Switch Measures

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.