I have had a similar situation where I wanted to limit the number of selections in the filter (i.e. the user would not see certain ones). The same solution may work here to.
Try the following...you will need to repeat the steps for both Schools and Programs.
- Duplicate the field (e.g. Schools (copy 2))
- Add this field to filters and set to "only relevant values" (or otherwise limit the selections as you need to (i.e manually select them)...this is what I did for my issue))
- Add this filter to the context
- Add the other/original filter (e.g. Schools) to the filters shelf and select "use all"
- Show the filter card, set this filter to "All values in the context"
- Use the original field (e.g. Schools) in the title
I hope this works for you!
1 of 1 people found this helpful
What I did in there:
Sheet 2. Simple sheet. Two dimensions. Title shows the value(s) of the dimensions.
3: I dragged Region to filters. Automatically, Tableau expands out the values in the title (even though ALL is selected). Change the filter. Go to ALL. Now the title says ALL again. (I don't like that Tableau does this. It's not consistent. But there it is.)
4: I created a calc to tell me how many regions can be the max. See [Regions in data]. I displayed that on the title. Change the filter. Value remains at 4.
5: I changed the REGION filter to be in context. NOW that FIXED LOD obeys the filter. this is crucial to the next sheet where STATES will be "Only Relevant". The same principle will apply to my [States in data] calc there.
6: Here I made my [States on page] calc. It differs from the [States in data] in that it counts what has been selected rather than what the max could be on the page.
7: Here I created both [States on sheet] and [states in data]. You can see how they interact.
8: I made a calc called index. I set it to run down the table, along States, and then along Region. This gives me a count from 1-through-N, alphabetically along all the states. Then I created a [List of states] calc that runs along the same order as INDEX, and builds a growing list of all the states. you can see the output on TEXT.
9: Final step. I built a calc that either displays ALL if the two [States...] calcs are equal (meaning the user has selected all available states) or the MAX list of states in that growing string of [List of states].
And that's how you control the value when you have something other than the true "All" list from the overall data source.
I tried the other solution which did work, but I'm going to give yours a try as well and see if this is easier/quicker/neater. Thank you!
Thank you - your solution, and your workbook were a huge help for me to get this working.