Forum Discussion
yashwant101
1 year agoHelper III
Multiselect with Disconnect Table
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 I am creating a me...
- Anonymous1 year ago
Hi yashwant101
Please try the following measure:Measure = IF(ISFILTERED('Patient Copay Amount'[Patient Copay]), SWITCH( TRUE(), "0-50" IN VALUES('Patient Copay Amount'[Patient Copay]) && [Total Copay]<=30, 1, "50-100"IN VALUES('Patient Copay Amount'[Patient Copay])&& [Total Copay]>30 && [Total Copay]<=100, 1, "100-150"IN VALUES('Patient Copay Amount'[Patient Copay]) && [Total Copay]>100 && [Total Copay]<=160, 1, "150-200"IN VALUES('Patient Copay Amount'[Patient Copay]) && [Total Copay]>160, 1, 0 ),1 )
Result:Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
1 year agoNot applicable
Hi yashwant101
To handle multiple selections, you can use the "IN" function along with "VALUES" to check if the Total Copay falls within any of the selected ranges. Here’s an updated version of your measure:
Measure =
IF(
ISFILTERED('Patient Copay Amount'[Patient Copay]),
SWITCH(
TRUE(),
MAX(Copay Table[Total Copay]) <= 3000 && "$0-$3000" IN VALUES('Patient Copay Amount'[Patient Copay]), 1,
MAX(Copay Table[Total Copay]) > 3000 && MAX(Copay Table[Total Copay]) <= 5000 && "$3000-$5000" IN VALUES('Patient Copay Amount'[Patient Copay]), 1,
MAX(Copay Table[Total Copay]) > 5000 && MAX(Copay Table[Total Copay]) <= 7500 && "$5000-$7500" IN VALUES('Patient Copay Amount'[Patient Copay]), 1,
MAX(Copay Table[Total Copay]) > 7500 && MAX(Copay Table[Total Copay]) <= 10000 && "$7500-$10000" IN VALUES('Patient Copay Amount'[Patient Copay]), 1,
MAX(Copay Table[Total Copay]) > 10000 && MAX(Copay Table[Total Copay]) <= 12500 && "$10000-$12500" IN VALUES('Patient Copay Amount'[Patient Copay]), 1,
MAX(Copay Table[Total Copay]) > 12500 && "Above $12500" IN VALUES('Patient Copay Amount'[Patient Copay]), 1,
0
),
1
)
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.