5 Replies Latest reply on Oct 11, 2018 8:00 PM by Joe Oppelt

# Restricting specific lable value when use only "All" option in filter

Requirement is to restricting particular label value when use only All option in filter. example

when select All option in filter-south values need to exclude

when select South in filter-it should display only south values

when select East in filter-it should display only East values

when select North in filter-it should display only North values

when select West in filter-it should display only West values

example Data Set : in tableau

example Data Set :  in excel.

 Region amount East 34263 north 67265 south 129138 west 61873
• ###### 1. Re: Restricting specific lable value when use only "All" option in filter

There is technically no "All" value to test for.  ALL is given to us in a filter list by Tableau as a convenience.

You can create two calcs to test if you have selected ALL though.

{ FIXED : COUNTD([Region]) }

This will tell you how many regions are in the data source.

{ EXCLUDE [Region] (, [dimension2], ...[dimension-N) : COUNTD([Region]) }

The second calc will tell you how many regions were brought into the underlying table by the filter.  (It may not necessarily tell you how many regions were clicked in the filter list though.)  The extra dimensions are all the other dimensions you have on your sheet.  If you only have [Region], then you only need that one dimension listed in the exclude list.  But if you have 4 other dimensions on your sheet, they'll need to be listed (comma separated) as well.

If the two calcs are equal, then you can display what you need by another calc.  For now, though, see if you can get those two calcs working properly on your sheet, and then we can decide how to control what gets displayed from there.  Create the calcs, and display them in your title for now.

• ###### 2. Re: Restricting specific lable value when use only "All" option in filter

both calculation 1 and Calculation 2 getting same output i.e 4

• ###### 4. Re: Restricting specific lable value when use only "All" option in filter

hi, I am unable to upload sample workbook...below is the actual data set

 Region amount East 34263 north 67265 south 129138 west 61873

Total sum Value is  292,539

Requirement is to restricting particular label value when use only All option in filter. example

when select All option in filter-south values need to exclude :  out put value should be 292,539-1,29,138 = 1,63,401

when select South in filter-it should display only south values : out put value should be  1,29,138

when select East in filter-it should display only East values      : out put value should be 34,263

when select North in filter-it should display only North values  : out put value should be 67265

when select West in filter-it should display only West values   : out put value should be 61873

screenshot in tableau

• ###### 5. Re: Restricting specific lable value when use only "All" option in filter

I can't see what is wrong with the calcs from a screen shot.  The only way I can help further here is with a sample workbook.