5 Replies Latest reply on Sep 16, 2013 9:33 AM by Matt Lutton

    Allow end user to select level of hierarchy?

    Wilson Becker

      Hey everybody-

       

      I'm relatively new to Tableau, so I would appreciate your help with this.

       

      Basically what I'd like to do allow the end user to expand and contract hierarchies on the row shelf

       

      Take the Superstore Sales for example... Let's say I have the following hierarchy:

      1) Region

      2) State

      3) City

       

      I would like  the end user to look control the view so he can look at sales data by:

      1) Region

      2) Region►State

      3) Region►State►City

       

      Is there a way to set up a parameter control which either allows the user to change the rows on the shelf? Or a way to chose the level of hierarchy that's active?

       

      Any help would be much appreciated!

        • 1. Re: Allow end user to select level of hierarchy?
          Matt Lutton

          Yes--using a parameter, you can allow the user to choose either "Region", "State", or "City" to modify the view accordingly.  This is a pretty good place to start:

          Changing Views Using Parameters | Tableau Software

           

          Once you do this once, it becomes easier every time and it can really save some time and dashboard space down the road.  Best of luck, let us know if you have any trouble setting it up.

          • 2. Re: Allow end user to select level of hierarchy?
            Matt Lutton

            I set up a very simple parameter in the attached--if you were using user filters along with this, then regional manners would only see their region, the states within that region, and the cities within those states...


            Simple parameters like this one are created in two steps:

            1) Create the parameter

            2) Create a calculated field to leverage the parameter

            *Then, you place the calculated field on rows/columns instead of the Region, State, or City dimensions.

             

            The Calculated field "Region State or City Calc" in my example is simply:

            CASE[Region State or City?]

            when "Region" then [Region]

            when "State" then [State]

            when "City" then [City]

            end

             

            And the parameter is a list of Strings which match what is in quotation marks above.  Hope this helps you.  You can get much more complex than this, but I hope this demonstrates what is possible.

            1 of 1 people found this helpful
            • 3. Re: Allow end user to select level of hierarchy?
              Matt Lutton

              Also, I see I found this thread somehow, even though it is not posted in the "Forum" section. In the future, in order to get the best response, always choose to post in the "Forum" section when you create a thread.  This happens often, because by default, "Forums" is not selected as the area to post when you create a question.  Hopefully posting to the forum will become easier for users in the future as this is a common occurrence.

               

              Cheers!

              1 of 1 people found this helpful
              • 4. Re: Allow end user to select level of hierarchy?
                Wilson Becker

                All of this is so helpful! Thanks for your quick and thorough response, Matt. I was kind of on the right track, but I was over-thinking it

                And thanks for the heads up about posting in the forum

                 

                Regards

                • 5. Re: Allow end user to select level of hierarchy?
                  Matt Lutton

                  Not a problem, Wilson.  I had many helpful members walk me through aspects of Tableau when I first started a few months ago.  You'll learn a lot by just trolling through forum threads and reading as much as you can about Tableau in your spare time.  I'm still not nearly where I'd like to be, but there is a lot to learn!

                   

                  Also, thanks for marking the question answered.  You'd be amazed how many times that does not happen, and it makes the forum a better place when we keep it "clean'.

                   

                  Best of luck.