Forum Discussion
Variable Equals Selected Value in Slicer
I've been at this for a week now and it's driving me crazy 😅
I have a report that shows various different charts relating to information about cases. Only "Regular Feed" cases should be shown on the report, so I have a calculated column that marks all cases reported via "Method 1" and some from "Method 2" that regard certain topics as appropriate, and a page filter to filter to just those cases.
I now need to create a slicer with three options, "Method 1", "Method 2", and "Regular Feed", that changes the way that the data is filtered. If "Method 1" or "Method 2" are chosen, it shows just cases that came from those methods (which is explicited stated in the data). If "Regular Feed" is chosen, then it'll do the calculation that I talked about earlier.
I've tried making a switch statement and use a SELECTEDVALUE to produce a Variable that returns the selected value in the slicer however it keeps returning blanks. Any clue how to achieve this differently?
5 Replies
- BlameXenNew Member
Ahh explains the difficulty. Below is an example of the raw data (anonymised):
CaseID CaseType CaseMethod CaseDetails 1 Type1 Method1 Anonymized 2 Type3 Method1 Anonymized 3 Type7 Method1 Anonymized 4 Type1 Method1 Anonymized 5 Type6 Method1 Anonymized 6 Type3 Method1 Anonymized 7 Type1 Method1 Anonymized 8 Type1 Method2 Anonymized 9 Type9 Method1 Anonymized 10 Type3 Method1 Anonymized 11 Type2 Method1 Anonymized 12 Type5 Method1 Anonymized 13 Type2 Method1 Anonymized 14 Type5 Method2 Anonymized 15 Type3 Method2 Anonymized 16 Type1 Method1 Anonymized 17 Type1 Method1 Anonymized 18 Type4 Method1 Anonymized 19 Type5 Method1 Anonymized 20 Type7 Method1 Anonymized
When "Method1" is selected in the filter, I'd like it to look like:CaseID CaseType CaseMethod CaseDetails 1 Type1 Method1 Anonymized 2 Type3 Method1 Anonymized 3 Type7 Method1 Anonymized 4 Type1 Method1 Anonymized 5 Type6 Method1 Anonymized 6 Type3 Method1 Anonymized 7 Type1 Method1 Anonymized 9 Type9 Method1 Anonymized 10 Type3 Method1 Anonymized 11 Type2 Method1 Anonymized 12 Type5 Method1 Anonymized 13 Type2 Method1 Anonymized 16 Type1 Method1 Anonymized 17 Type1 Method1 Anonymized 18 Type4 Method1 Anonymized 19 Type5 Method1 Anonymized 20 Type7 Method1 Anonymized
When "Method2" is selected:CaseID CaseType CaseMethod CaseDetails 8 Type1 Method2 Anonymized 14 Type5 Method2 Anonymized 15 Type3 Method2 Anonymized
But then when "Regular Feed" is selected, only certain types with certain details are shown irregardless of Method (vague I know but it's a pretty sensitive sorting algrothim to our business):CaseID CaseType CaseMethod CaseDetails 3 Type7 Method1 Anonymized 4 Type1 Method1 Anonymized 5 Type6 Method1 Anonymized 6 Type3 Method1 Anonymized 7 Type1 Method1 Anonymized 9 Type9 Method1 Anonymized 10 Type3 Method1 Anonymized 11 Type2 Method1 Anonymized 12 Type5 Method1 Anonymized 15 Type3 Method2 Anonymized 16 Type1 Method1 Anonymized 17 Type1 Method1 Anonymized 18 Type4 Method1 Anonymized 20 Type7 Method1 Anonymized 15 Type3 Method2 Anonymized 16 Type1 Method1 Anonymized 17 Type1 Method1 Anonymized 18 Type4 Method1 Anonymized 19 Type5 Method1 Anonymized 20 Type7 Method1 Anonymized
- parry2k
Super User
BlameXen create a new table for slicer (maybe you already have it) with two columns:
Slicer Display Name Method Name Method 1 Method 1 Method 2 Method 2 Regular Feed Method 1 Regular Feed Method 2 Set the relationship on the "method name" with your data table, it will be many to many relationship, and change the relationship setting to "slicer table" will filter the "data table".
And that's it, use the display name column in the slicer and everything should work.