1 Reply Latest reply on Aug 5, 2016 2:06 PM by Stoyko Kostov

    Conditionally Turn Filter OFF

    Adam Borenstein

      I have a calculated field with multiple values, which is then dragged to the filter shelf. I want to use a parameter such that when the parameter = value of choice, the filter is turned on, otherwise the filter is turned off.


      How can I do this? I am having trouble formatting the language of the calculated field to accept the values I am using, some are strings and some are integers.

        • 1. Re: Conditionally Turn Filter OFF
          Stoyko Kostov

          Hi Adam,


          You can create a Boolean parameter ApplyFilter and show it on the sheet. You also need to be able to define your filter via formula expression, i.e. [Status]='active'.


          Now, drag any dimension that participates in the filter definition to the Filters card. Choose condition-by formula, and enter (<Original_filter_definition>) OR NOT [ApplyFilter].

          For example, ([Status] = 'active') OR NOT [ApplyFilter].


          Now when ApplyFilter is set to True, your original filter definition will drive the contents. When ApplyFilter is set to False, "OR NOT [ApplyFilter]" will evaluate to True and the original filter definition won't matter: nothing will be filtered with respect to this filter.


          If you are having difficulties expressing your filter as a formula, please attach a sample packaged workbook. Maybe just a few values from the field you want to filter on, and explain what you would like to achieve.


          Hope this helps!