7 Replies Latest reply on Jun 3, 2015 3:27 PM by Rody Zakovich

    Customizing items in the Parameters List

    amol.khor

      I have a dimension temp which has 3 values (B,C,D)

      I am using the parameter option because i am using 2 data sources.

      I have created a parameter PARAMETER1 which has the  following list.

      (All)

      B

      C

      D

       

      I have a requirement where i want to customize the list.

      I want to show in the parameter only 3 items..

      (All)

      B

      C+D

       

      What logic should i specify in the calculated field?

       

      Thanks!

        • 1. Re: Customizing items in the Parameters List
          Shawn Wallwork

          Parameter lists are static, not dynamic. So you can't do this. You can't create a calculation that will change a parameter. Assuming I'm understanding you correctly, and you are really talking about parameters and not quick filters.

           

          --Shawn

          • 2. Re: Customizing items in the Parameters List
            amol.khor

            Yes, I am using parameters..
            Actually i got the idea from one of the forum link on tableau regarding Multi-value parameters. http://community.tableau.com/ideas/1313

            In the forum discussion it is mentioned  .
            "Today, you have to hard code all combination of possible values in your parameter:

            East, West, Central, South, ALL, East+West, East+Central, East+South,....etc.

            and code in calculated field using if then else what happens for each combination of values used. This is combersome and cannot be done if I have a lot of combination possible."

            Just want to implement something similar.


            • 3. Re: Customizing items in the Parameters List
              Rody Zakovich

              Hey Amol,

               

              This is a little, well, not pretty, but you could create a parameter like this.

               

              6-3-2015 4-39-54 PM.png

               

              Then create a calc like this.

               

              IIF([Parameter 2] = 'ALL'

                  , 1=1

                  , IIF([Parameter 2] = 'B'

                      , [Parameter 2] = [Type]

                      , IIF([Parameter 2] = 'C+D'

                          , CONTAINS([Type], LEFT([Parameter 2], 1))

                              OR

                          CONTAINS([Type], RIGHT([Parameter 2], 1))

                          , FALSE

                      )

                  )

              )

               

              Put that in the filter shelf and select TRUE.

               

              I'm sure there is better ways to do this, but this is an option.

               

              Regards,

              Rody

              • 4. Re: Customizing items in the Parameters List
                Rody Zakovich

                Here is the example workbook.

                 

                Regards,

                Rody

                • 5. Re: Customizing items in the Parameters List
                  amol.khor

                  Thank you so much Rody!
                  Cheers!

                  • 6. Re: Customizing items in the Parameters List
                    Shawn Wallwork

                    "Today, you have to hard code all combination of possible values in your parameter:

                    East, West, Central, South, ALL, East+West, East+Central, East+South,....etc.

                    and code in calculated field using if then else what happens for each combination of values used. This is combersome and cannot be done if I have a lot of combination possible."

                    Amol, just to be clear, Rody is not using a calc to write new values to a parameter. He's just using a parameter to change what is visible in a dimension. You are still going to have to hard code all those combination in the parameter and write the nesting code to accommodate the selection a user makes. So you still have a lot of cumbersome work to do.

                     

                    Ideas are Tableau's version of 'Feature Requests'. And the idea you linked to is one of the most popular ones: multiple select parameters.

                     

                    --Shawn

                    • 7. Re: Customizing items in the Parameters List
                      Rody Zakovich

                      Hey Amol,

                       

                      Shawn is completely right, I'm not writing values into the parameter, just simply modifying what is visible by the STATIC value of the parameter.

                       

                      You still have to (In some fashion or another) list every possible combination. My example was very simple, the more combinations/values you have the more nested this calc will get.

                       

                      Regards,

                      Rody