Is it important that you be able to change which segments show data using the quick filter checkboxes? You can accomplish what you're looking for with a set, but it takes a couple extra clicks to modify which categories are included/excluded.
Create a set on Segment.
Create a calculation that returns [Sales] for segments in the set, and 0 for segments not in the set.
Create a calculation that returns the string "No data" for segments not in the set.
With [Segment] on the Columns shelf, drag [Sales for Segments to Show] to the Rows shelf, and [Hidden Segment Label] to the Text shelf.
To modify which segments are included or excluded, right click on the set and select "Edit", and use the dialog to update the contents of the set.
Hope that helps! Also find the workbook attached.
Hi Chris. This helps but changing the set manually will not help, I think we need to make the set dynamic correct?
this is working for home office...but when the user selects let us say only consumer in the Segment Filter , it should display no data at Corporate and Home Office places. Similarly if the user changes the filters , the un-selected should show no data at the respective places dynamically.
should we use something like filters and set together to make this work ? No idea.
1 of 1 people found this helpful
You are correct, this does not work with filters. The solution I suggested is instead of a filter, not in addition to a filter. To change which segments show "no data", you change the set membership by right clicking on the set and selecting "Edit Set...". There is currently no "Show Filter" equivalent for modifying sets from within the viz.
Tableau 2018.3 has Set Actions, which would allow you to use a sheet on a dashboard for set member selection, but it looks like you're running Tableau 10.5.
I'm not aware of any other way to get the exact behavior you want, but if you can elaborate on why you need the data to display like this, we may be able to suggest workarounds or alternative approaches.
Thanks Chris for all the help. Yeah looks I can't with 10.5
I need this , suppose we have X and Y in a filter, when i select X it only selects data for X and I need to show No data in the Y place and on the chart and vice versa. That is my use case.