Forum Discussion
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
- Anonymous2 years ago
Hi VizualByK ,
You can try the measure belowIsFiltered = 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 HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
1 Reply
- AnonymousNot applicable
Hi VizualByK ,
You can try the measure belowIsFiltered = 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 HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly