8 Replies Latest reply on Jun 28, 2018 7:06 AM by Gerardo Varela

    Dynamic Hierarchy

    Robin Pandita

      Hello Everyone,

       

      I have four levels of employees structure i.e LEVEL1, LEVEL2, LEVEL3, LEVEL4

      So the actual hierarchy is LEVEL1->LEVEL2->LEVEL3->LEVEL4 i.e LEVEL1 is reporting to LEVEL2, LEVEL2 is reporting to LEVEL3 and so on.

       

      I have stuck with a requirement where users want the LEVELs in filter where when they select LEVEL2, the hierarchy should start from LEVEL2. i.e It should appear as LEVEL2->LEVEL3->LEVEL4

      and if user select LEVEL3 then hierarchy should start from LEVEL3. i.e LEVEL3->LEVEL4.

       

      Thanks and Regards,

      Robin

        • 1. Re: Dynamic Hierarchy
          Mavis Liu

          Hi Robin,

           

          You could create a parameter which has a list of the levels:

           

          2018-06-26_15h29_56.png

           

          Then create 4 views, one for where you want each of the levels to start, e.g.

          2018-06-26_15h30_33.png

          2018-06-26_15h30_45.png

           

          Then create a calculated field with only the parameter inside the calculation. Drag this field to the filters and set it to 1 for view 1, 2 for view 2 etc.

           

          Then bring all your views together in one container in the dashboard so that you get this:

           

          2018-06-26_15h29_09.gif

           

          Please see attached workbook.

           

          Thanks,

           

          Mavis

          • 2. Re: Dynamic Hierarchy
            Gerardo Varela

            Hi Robin,

              Attached is another plausible solution.  Using parameters, I've shifted the levels in the hierarchy.  If this is works for you, and you need me to explain anything, just let me know.

             

            Regards,

            Gerardo

            1 of 1 people found this helpful
            • 3. Re: Dynamic Hierarchy
              Robin Pandita

              Hi Gerardo,

               

              Thanks.. It worked as expected. But now I'm facing another issue.

              After selecting level 1 or level 2 , the data displays correctly, but after selecting level 3, there is a blank column displayed. But we need to hide this blank column

              when level 3 is selected. Kindly find the below Screenshot attached

              As per actual data, we have total 7 levels of hierarchy. So after selecting level 2 onwards, blank columns start appearing. Finally when level 6 is selected, then 5 blank columns appear. The data is correct, but we just need to hide this blank columns.

               

               

              select_level1.PNGselect_level3.PNG

              • 4. Re: Dynamic Hierarchy
                Mavis Liu

                Hi Robin,

                 

                Have you tried my idea of sheet swapping?

                 

                Thanks,

                 

                Mavis

                • 5. Re: Dynamic Hierarchy
                  Robin Pandita

                  Thanks a lot Mavis. I also go through your solution . It is working fine but the number of measures we have are almost 15 and hierarchy upto 7 levels.

                  So if there comes two more measures to be added in the same development , we need to add two measures in all 7 worksheets which will be tedious .

                  Hence we followed  Gerardo's solution.

                   

                  Thanks,

                  Robin

                  • 6. Re: Dynamic Hierarchy
                    Jim Dehner

                    Good morning

                    Don't know what version you are using but Dynamic hierarchy filters are a feature in 2018-1

                     

                     

                    The feature is new in 2018 -

                    Jim

                    If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

                    • 7. Re: Dynamic Hierarchy
                      Robin Pandita

                      Thank you Jim for your solution.

                      I think there is a confusion in understanding the scenario.

                       

                      Let us take your example

                      Consider a hierarchy as Product_Hierarchy

                      Category(Level1)-> Sub Category(Level2)->Segment(Level3)

                       

                      We dont want value in the filters, requirement is getting Level1, Level2 and Level3 in filter not its values.

                       

                      Kindly check my reply in  Gerardo's solution for my problem.

                       

                      Also we are using the Tableau version 10.5.0

                       

                       

                      Regards,

                      Robin

                      • 8. Re: Dynamic Hierarchy
                        Gerardo Varela

                        Hi Robin,

                             I don't know of a way to get rid of the blank column. Sorry!

                         

                        Regards,

                        Gerardo