1
votes

I have a problem with Filters.

I have a dimension with the values (0, 1, 2, 3, 4, 5). I want to use this dimension as a filter, but not to let the user the option to filter out the value "0". I don't want to exclude the values 0, the opposite - I want these values to ALWAYS be in the view, and let the user the chance to filter only between (1, 2, 3, 4, 5).

Is that an option? To remove a value from the filter but not from the data?

Any help would be very appreciated Thank you!!

1
Do you want users to be able to choose any single value to include in the filter (other than zero)? Or any combination? If a single choice, that allows a solution using parametersAlex Blakemore
@Bernardo I think this problem may be different enough that the solution you referenced won't applyAlex Blakemore
@AlexBlakemore - You're right, the answer in the link is how to exclude values all together, not what I needed. I want multiple choices as well - I know that I can use parameter for single-choice (not only parameter, but also "custom value list" filter...).Bramat
I would post this question on Tableau's user forum at tableau.com. If you find a solution, please post here tooAlex Blakemore

1 Answers

2
votes

If I understood your question correctly then my answer is - Yes, there is a way to do so.

Let's say your dimension name is 'dim_field' having value (0, 1, 2, 3, 4, 5) then

  • Create a parameter - let's name it as 'parm_field'. In create parameter window select 'data type' as string, 'Allowable values' as list, 'set from field' as dim_field (i.e. you dimension) and add one more row in this list as 'All'. Drag this row to top and select 'current value' as 'All'. Most importantly delete row having '0', as you don't want this to be in your filter and click ok.
  • Click on this parameter and select 'Show Parameter Control'
  • Create a calculated field 'is_DimField_selected' and define it as:

IF [parm_field] == 'All' THEN 'Y'
ELSE
  IF [parm_field]=[dim_field] THEN 'Y'
  ELSE 'N'
  END
END

  • Add this calculated field to filter and select 'Y'. Voila!

Kindly don't forget to mark as answer if it solves your problem ;)