4 Replies Latest reply on Jun 20, 2016 6:24 AM by . Balfour

    Setting a Seperate Color Legend within a hierarchy

    . Balfour

      Hi All,

       

       

      I'm trying to create a visualization that lets me dynamically show the same cut of data, but with two different levels of detail through the use of color legends.

       

      I have created a hierarchy, with two levels of detail and have them set by color within my worksheet.

       

      In this first screenshot, this is what it looks like at the top level of detail

       

      ss1.png

       

      And when I select the hierarchy, it looks like this:

       

      ss2.png

       

      Is there a way in which all of the sub-categories within my "VP" section can all be automatically assigned a separate colour when I select the hierarchy, and then be rolled back up to the same red colour again once the hierarchy is at the top level (as in screenshot 1) again?

      I'm certain there is a simple way around this, just I am unable to find an answer.

       

       

      Thanks in advance,

       

       

      Ross.

        • 1. Re: Setting a Seperate Color Legend within a hierarchy
          Stephane Marx

          Hi Ross,

          You can assign subcategory colors by clicking on the empty square on the right to Pack type.

          Like in the example below:

          However when you go back to the higher level of the hierarchy the subcategory coloring won't be remembered.

          I'd suggest to trick Tableau and create 2 worksheets, one with the Pack category on the mark color, one (same) but with the Pack category and Pack type on the color mark (proceed as explained above). In order to avoid coloring issues, get rid of the hierarchy relationship between pack category and pack type.

          Then create a parameter to swap from one worksheet to another and fake the hierarchy drill down. You do that by simply creating a string parameter with the 2 worksheet names.

          Process explained here:

          Tableau Tip: Switch between views dynamically on a dashboard - The Data School

          Hope this helps,

          1 of 1 people found this helpful
          • 2. Re: Setting a Seperate Color Legend within a hierarchy
            . Balfour

            Hi Stephane,

             

            Brilliant workaround - thanks very much. On that note of a parameter switching two worksheets, can you set a parameter to switch more than one worksheet on the dashboard?

             

            So in my example, I have another Area chart beside it, when I set the parameter switch, it only switched the color fields of one area graph, is there a way in which I can set a parameter to switch between color levels both sheets with one click? So the screenshot below is the top level

             

            ss3.png

             

            and here is the result when I set the parameter to the switched page:

             

            ss4.png

             

            Ideally both graphs should update showing the color changes. Hopefully this visually makes it clear how I wish the action to occur, it would be fantastic.

             

             

            Thanks again!

            • 3. Re: Setting a Seperate Color Legend within a hierarchy
              Stephane Marx

              Hi Ross,

              Good it helped you. Yes you can create a parameter to switch between several worksheets.

              Create a integer parameter with a list of 1,2.. N values.

              Create a calculated field equals to the parameter.

              Turn the calculated field to a dimension (right click convert to dimension) - it will make the filtering easier-.

              Set the calculated field on the filter shelf for each worksheet and assign the different list values 1/ 2 /3 by changing the parameter option. You'll be able to swap between several worksheets.

              Regarding the coloring thing, I'm not totally sure of what you want to achieve. But you could combine coloring the trick I explained first with the mutli-work sheet swap above, and set the parameter to be true in 2 worksheets (the ones you want to be synchronized). I'm working on a more detailed blog post about it, I'll keep you updated.

              Hope this helps!

              • 4. Re: Setting a Seperate Color Legend within a hierarchy
                . Balfour

                Hi Stephane, thanks again for the useful reply, really appreciated.

                 

                On regards to what I'm wanting to achieve, I will attempt to explain it with more clarity, that should hopefully make it clear my aim for this worksheet.

                 

                 

                ss5.png

                 

                The image above highlights the current drawback with what I have so far . I have a parameter for Revenue (left set of graphs) and one for Units (right set of graphs) As you can see below it, I have had to set two parameters for each, as I cannot find a way to set a parameter that will apply to all sheets on my dashboard. This means when I present the data, and want to see the graphs at the "Level 2" level of detail (which will show more lines on the area chart and line chart - due to containing more fields), I have to manually click both sliders in order for both sets of graphs to show it. The screenshot above shows that the slider has been set to Level 2 on the left graph, and not the one on the right.

                 

                Ideally, what I would like to achieve would be to only have one parameter active on the dashboard, that would enable me to go to the "Level 2" level of detail on all graphs, rather than having to have two parameters, and manually selecting the level on both of them, which isn't as efficient and effective for presenting.

                 

                 

                Hope this makes sense!

                 

                 

                Thanks again,

                 

                Ross.