Adding "All" Option to Parameters

Version 1

    Description:

     

    The calc below demonstrates how to add an "All" option to parameters. This is beneficial when filtering across datasources, where the user needs the ability to look at All values, or individual values.

     

     

     

    Example Calculation:

     

    //For Dimension

    IIF(

        [Parameter] = 'All'

        , 1=1

        , [Parameter] = [Your Dimension]

    )

     

    //For Measure

    IIF(

        [Parameter] = Number outside of you dataset. See Below.

        , 1=1

        , [Parameter] = [Your Measure]

    )

     


    Comments:

     

    The gives us a "True" only filter. When "All" is selected, 1=1, which is just another way of saying don't filter anything. Else your parameter equals your dimension/measure.

     

    Also, since Tableau allows us the ability to change how to Display the parameter. We can create an Int list, and pass in a number that is not applicable to the dataset, but display as All

     

    6-12-2015 10-16-41 AM.png