4 Replies Latest reply on Mar 9, 2017 12:06 PM by KK Edla

    Cross Tab design

    Suresh Babu Kommuri

      Hello All,

       

      I am looking for structural cross tab help.

       

      I need to show data in the below fashion.

      Dimensions are

      Wholesaler

      Date

       

      measures are

      Total sales

      India Sales

      US sales

       

      India & US sales show based on date only under date column.

      OctNovDecOct
      NovDec

      Wholesaler

      Total SalesIndia Sales outUS SalesIndia salesIndia salesIndia salesUS SalesUS SalesUS Sales
      Tesco1000050005000100020002000200010002000
      Walmart20000500015000200015001500500050005000
        • 1. Re: Cross Tab design
          Matthew Risley

          Suresh,

           

          If you could add an attached workbook that is always best for these types of problems. Otherwise, we can't really play with the data.

           

          In the meantime, my guess would be the following:

           

          -Wholesaler on rows

          -Date on columns. Year first. Then Month. (filter for only Q4 by dragging quarters to filters and selecting Q4 - assuming calendar year)

          -Add US Sales and India sales to columns after date.*

          -For total sales use the ''Totals" options in the analysis ribbon or the Analytics pane that Tableau has and move it to the left.

           

          * I'm foreseeing an issue with your sales measures, though. A recommendation might be to have one "Sales" Column and then another column that is "Sales Type" and would indicate India or US.

           

          Something similar with my dummy data:

           

          Let me know if this helps!

          --Matt

          1 of 1 people found this helpful
          • 2. Re: Cross Tab design
            Suresh Babu Kommuri

            Hello Matthew Risley,

             

            Thank you for your quick help. exactly I wanted like in screenshot.

             

            I tried but not able to separate Grand total as a column from Year or month calculation context. could you please upload your tableau test file along with you missed steps in highlighting to me.

             

            Advanced thanks,

             

            Suresh

            • 3. Re: Cross Tab design
              Matthew Risley

              Sure,

               

              The only steps that may not be clear are the totals: So here are some screenshots:

               

              Drag totals from analytics pane:

               

              Move to the left:

               

              Alternatively you can also use the Analysis Tab to do some of this work as well.

              • 4. Re: Cross Tab design
                KK Edla

                Hi Suresh,

                 

                Just like Matt explained, you might want to create calculated fields to segregate your sales for US and India and use cross tab like below.