8 Replies Latest reply on Oct 13, 2016 1:24 PM by Matt Hall

    Using multiple parameters for filtering

    Matt Hall

      Hello,

       

      Is there a way to create parameters with an inherent order for multiple levels of filtering? The end users want to perform some complex filtering.

       

      We have multiple variables of interest to the end user and currently I have a way to let them see one at a time. E.g. Of all the patients, what percentage

      were over the age of 65? Of all the patients, what percentage are on dialysis? I am using parameter control to instantly switch between this huge

      array of variables.

       

      I want to take it a step further for more complex analysis. E.g. Of all the patients who are over 65, how many/what percent of those patients are on dialysis?

      Or conversely, of all the patients who are on dialysis, how many/what percent are over 65?

       

      Is there a way to create a set of parameter controls that have a filter order to them? I'm thinking they would look like "select first variable of interest,"

      "select second variable," etc. Is it possible to first filter the data by the first parameter control, then have the second parameter control filter apply after

      the first one?

       

      These will definitely be unrelated fields, so I'm thinking using hierarchies are a no go.

       

      Thanks!

        • 1. Re: Using multiple parameters for filtering
          Luciano Vasconcelos

          Matt, how about you post some info?

          Your idea can work but is hard to guess without see some info.

          • 2. Re: Using multiple parameters for filtering
            Matt Hall

            Standby, I have to edit out protected information, then run that by supervisor. Will post when I get the all-clear.

            • 3. Re: Using multiple parameters for filtering
              Matt Hall

              While I am waiting for an answer from my supervisor on whether I can post any workbook/data (hopefully by tomorrow), what more information would be helpful so I can prepare? I have successfully created a single parameter for end users and it works perfectly. The calculated field that allows the user to select has the following code:

               

              IF [p_Select First Variable of Interest]="Age>=65" then [% Age>=65]

              ELSEIF [p_Select First Variable of Interest]="Female" then [% Gender, Female]

               

              This goes through all of the variables of interest and like I said, works great. I use the parameter to select between variables seamlessly.

               

              I attempted to create a second parameter control, using basically an identical calculated field for selection, looking like this:

               

              IF [p_Select Second Variable of Interest]="Hypertension" then [% Hypertension]

              elseif [p_Select Second Variable of Interest]="Chronic Lung Disease, Any" then [% Chr Lung D, Any]

               

              This also continues through all variables of interest. However there is no affect on the viz when I use the second parameter to achieve the filtering, and no way to create a hierarchy with parameters.

               

              If there is more information needed, I will post later as it's quitting time where I am .

               

              Thanks for any help, please ask questions if you need to

              • 4. Re: Using multiple parameters for filtering
                Luciano Vasconcelos

                Matt, when you use this kind of filters they execute at the same time and can be conflicting.

                If you click on first parameter filter and add it to context, this filter will execute first. This way you create an hierarchy of two levels.

                Hope it helps.

                • 5. Re: Using multiple parameters for filtering
                  Matt Hall

                  Tableau doesn’t allow parameters to be added to the filters card, and only items on the filters card can be added to context. I’m wondering if playing with the order of operations to create different filters would work, but I want the end users to be able to interact with all the filters I want to give them (apply variable of interest to every record in the database, to only records that are in a sub-group of participants, and to only records which belong to a single participant)

                   

                  Thank you for responding!

                  • 6. Re: Using multiple parameters for filtering
                    Luciano Vasconcelos

                    You will not use parameter as filter. You need to build calculations that will filter info based on parameters selections.

                    These calculations will be used as filters.

                    • 7. Re: Using multiple parameters for filtering
                      Luciano Vasconcelos

                      On this one, Region selection happens before Continent selection:

                       

                      Bad thing is that parameters don't have relevant values option.

                      • 8. Re: Using multiple parameters for filtering
                        Matt Hall

                        Here is a screenshot. I use the circled parameter control to filter by the calculated field v_variable select, which gives me filters in the view based on what the parameter is set to. In this capture,

                        the display is filtering out all participants, from the total number of records, by those who are non-caucasian, leaving the total percent of non-caucasian participants undergoing the respective procedures. This first parameter works great, and is accurate when selecting between the calculated field of v_variable select.

                         

                        What I want to know is if it is possible to have the second parameter control appear (the one titled select second variable of interest) that will apply a filter to the data after the first parameter filters.

                        As an example, if the first variable of interest is non-caucasian particpants and they are filtered out leaving only non-caucasian. How can I create a second parameter filter that says of the non-caucasian participants, how many of those went on a ventilator (Vent Hrs)? I want the user to be able to select between a whole list (I saw vent hrs, but now I want to see how many non-caucasians had post-operative complications, etc.)

                         

                        Thanks for your input!