Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Solved! Go to Solution.
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
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
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
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |