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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.