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

Disconnected Table Slicer

Hi all,

 

I have 2 disconnected tables. I am taking data from one of the tables and a slicer (Patient Copay) from another. Now I need to filter grids based on the slicer. To do that Ia m creating a measure and putting it as a visual level filter on the grids. I have crated the measure but the issue that I am facing is that I have to make the slicer multiselect and combination of SWITCH and SELECTEDVALUE is not functioning properly. Below is my measure:

 

 

IF(ISFILTERED('Patient Copay Amount'[Patient Copay]),
SWITCH(
    TRUE(),
    SELECTEDVALUE('Patient Copay Amount'[Patient Copay]) = "$0-$3000" && MAX(Copay Table[Total Copay])<=3000, 1,
    SELECTEDVALUE('Patient Copay Amount'[Patient Copay]) = "$3000-$5000" && MAX(Copay Table[Total Copay])>3000 && MAX(Copay Table[Total Copay])<=5000, 1,
    SELECTEDVALUE('Patient Copay Amount'[Patient Copay]) = "$5000-$7500" && MAX(Copay Table[Total Copay])>5000 && MAX(Copay Table[Total Copay])<=7500, 1,
    SELECTEDVALUE('Patient Copay Amount'[Patient Copay]) = "$7500-$10000" && MAX(Copay Table[Total Copay])>7500 && MAX(Copay Table[Total Copay])<=10000, 1,
    SELECTEDVALUE('Patient Copay Amount'[Patient Copay]) = "$10000-$12500" && MAX(Copay Table[Total Copay])>10000 && MAX(Copay Table[Total Copay])<=12500, 1,
    SELECTEDVALUE('Patient Copay Amount'[Patient Copay]) = "Above $12500" && MAX(Copay Table[Total Copay])>12500, 1,
    0
  ),1 
)

 

What I am doing now is putting the measure as visual level filter and putting it a 1. But this only works for single select

 

Thanks,

K

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @VizualByK ,
You can try the measure below

IsFiltered = 
VAR _group = 
SWITCH(
    TRUE(),
    MAX('Copay Table'[Total Copay])<=3000, "$0-$3000",
    MAX('Copay Table'[Total Copay])>3000 && MAX('Copay Table'[Total Copay])<=5000, "$3000-$5000",
    MAX('Copay Table'[Total Copay])>5000 && MAX('Copay Table'[Total Copay])<=7500, "$5000-$7500",
    MAX('Copay Table'[Total Copay])>7500 && MAX('Copay Table'[Total Copay])<=10000, "$7500-$10000",
    MAX('Copay Table'[Total Copay])>10000 && MAX('Copay Table'[Total Copay])<=12500, "$10000-$12500",
    MAX('Copay Table'[Total Copay])>12500, "Above $12500"
)
RETURN
IF(
    _group IN VALUES('Patient Copay Amount'[Patient Copay]),
    1,
    0
)

Final output

vheqmsft_0-1725502184864.png

 

Best regards,
Albert He


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

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @VizualByK ,
You can try the measure below

IsFiltered = 
VAR _group = 
SWITCH(
    TRUE(),
    MAX('Copay Table'[Total Copay])<=3000, "$0-$3000",
    MAX('Copay Table'[Total Copay])>3000 && MAX('Copay Table'[Total Copay])<=5000, "$3000-$5000",
    MAX('Copay Table'[Total Copay])>5000 && MAX('Copay Table'[Total Copay])<=7500, "$5000-$7500",
    MAX('Copay Table'[Total Copay])>7500 && MAX('Copay Table'[Total Copay])<=10000, "$7500-$10000",
    MAX('Copay Table'[Total Copay])>10000 && MAX('Copay Table'[Total Copay])<=12500, "$10000-$12500",
    MAX('Copay Table'[Total Copay])>12500, "Above $12500"
)
RETURN
IF(
    _group IN VALUES('Patient Copay Amount'[Patient Copay]),
    1,
    0
)

Final output

vheqmsft_0-1725502184864.png

 

Best regards,
Albert He


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

 

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.