5 Replies Latest reply on Dec 1, 2014 6:36 AM by Jonathan Drummey

    Origami Chart in Tableau

    bhawesh.jha

      I am trying to build Origami Chart in Tableau. The sample data is attached. Expected Output image is below:

      Origami Chart.jpg

      Details of the chart:

      • For all channel and region, we are studying three metrics (2010 sales, 2011 sales, difference of sales)

      Illustrative:

      For Channel1 & Region1

      2010 Sales : 502

      2011 Sales : 744

      Difference of Sales = 2011 Sales – 2010 Sales = 744 – 502 = 242

      • Background color coding is based on average of values for difference of 2011 & 2010 sale
      • If average (difference sales) at global scale (for all channel and region ) > X1, color is grees
      • Color is blue, if  X2 < average (difference sales) at global scale (for all channel and region ) < X1
      • If the average of less than zero  then the color is white

      The problem I am facing, is in the alignment of the values of sales and background color based on average values.

        • 1. Re: Origami Chart in Tableau
          SathishKumar Parthasarathy

          Hi Bhawesh,

           

          I hope you had added all the 3 measures in the Text marks of the Report, with Region in the Columns and Channels in the Rows.

           

          Now edit the Text Marks and Align the 3 measures one on the left, middle and the other to the right in 3 different lines with appropriate spacing between measures.

          change the Alignment to Center to distribute the 3 measures.

           

          Hope this Helps.

           

          Thanks,

          Sathish

          • 2. Re: Origami Chart in Tableau
            Jonathan Drummey

            @Bhawesh - Thanks for providing data.

             

            @Sathish - Looks like you and I are attempting to answer questions at the same time, I'm glad to see new people helping out on the forums! While the way you'd laid out the text marks is exactly how I'd approach the problem, there is still the question of the background colors. Can you demonstrate how to do those as well? Without that, the answer is incomplete, and I suspect that we'll find that what both you and I came up with won't work for a complete solution.

             

            Jonathan

            • 3. Re: Origami Chart in Tableau
              bhawesh.jha

              Jonathan Drummey SathishKumar Parthasarathy

              Thank you for your valuable suggestion.
              I tried that but the other problem is not getting resolved wherein we have to color code the background color based on the average of values (difference of 2011 & 2010 sales). And the average is calculated globally i.e for all regions and channels

              • 4. Re: Origami Chart in Tableau
                SathishKumar Parthasarathy

                Jonathan Drummey, I had tried using Dual Axis to fill the colors. Create a Dummy Variable X with Value as 1. Add it to Rows shelf and change the calculation to AVG(X). In the Marks use the Calculated field to represent the Colors, add the X into Size and change the mark type to Square.

                In the Dual axis i had the 3 measures, but i am not able to align them as expected before. attached the worksheet for your reference.

                bhawesh.jha, See if this helps

                 

                https://public.tableausoftware.com/views/OrigamiChart/Sheet16?:embed=y&:display_count=no

                 

                Thanks,

                Sathish

                • 5. Re: Origami Chart in Tableau
                  Jonathan Drummey

                  Hi,

                   

                  I've been poking at this off and on over the past month, trying to find a solution that seemed to be at least a bit acceptable. I think I've found two:

                   

                  Solution #1 - Scaffold. This solution uses a data source that has all combinations of Channel & Region, plus another Measure dimension used for positioning with values Upper Left, Center, and Bottom Right. There are measures in the original source that return the desired values, the original source becomes the secondary source to the scaffold primary and calculated fields in the primary are used to position the results. The Global Average measure is a table calculation that has a Compute Using of all dimensions in the view.

                   

                  A Gantt chart is used on the 0 axis on Columns to generate the background color. Because Tableau marks overlay cell borders, the borders here are actually created by a border for each Gantt Mark. The text is created on a dual axis using the X measure as a Circle Mark that is a calculated field to appropriately position each mark, with an increased level of detail by including the Measure dimension, and the text is then a mark label. Using the three calculated fields for the label gives us the left/center/right alignment, and the measure gives us more precise control over margins.

                   

                  Screen Shot 2014-12-01 at 9.08.17 AM.PNG

                   

                  The drawback to this solution (besides the complexity) is that if a user doesn't click on one of the marks, they will be clicking on the background Gantt mark and that selected mark will block out the text.

                   

                  Solution #2: Multiple Axis Crosstab. This uses the techniques from http://public.tableausoftware.com/views/conditionalformattingv4/Introduction to lay out three Gantt marks. I'm not a fan of this because there are three marks within each "cell" created by each Channel/Region, the borders look terrible, and the upper left and bottom right marks are jammed right up against the edges, but it is simpler to set up than the alternative.

                   

                  Screen Shot 2014-12-01 at 9.17.57 AM.PNG

                   

                  I've attached the workbook plus the scaffold source Excel file. If you have any questions, let me know!

                   

                  Jonathan