4 Replies Latest reply on May 29, 2017 3:24 PM by Hari Ankem

    Need to create a specific line Chart

    Ankit Jain

      Hello friends,

       

      I need some customized help in tableau to create specific line chart as shown given below in the screenshot:

      Thanks,

      Ankit

        • 1. Re: Need to create a specific line Chart
          Hari Ankem

          You need to do the following:

           

          1. Change Datatype of "TP" to Date.

          Capture.PNG

           

          2. Create 3 calculated fields as shown, and a copy/duplicate of Brands:

          Capture.PNG

           

          3. Place TP Sales Period (with required date format) in Columns and CY Sales in Rows, and Brands on Color marks.

          Capture.PNG

           

          4. Place PY Sales in Rows and convert to Dual Axis, and Synchronize the axes, and remove the header.

          Capture.PNGCapture.PNGCapture.PNG

           

          5. Set required colors for Brands for the CY Sales, and Brands (copy) for PY Sales.

          Capture.PNG

          Capture.PNG

           

          6. Your chart now looks like this. You can change the legends and colors to make them meaningful to you.

          Capture.PNG

           

          You can use quick table calculations by right clicking on the Sales sums to get percentages.

           

          Hope this helps. Thanks.

          • 2. Re: Need to create a specific line Chart
            Ankit Jain

            Hi Hari,

             

            I like the approach in the way you explained. However, I am not able to proceed after 2 step. It will be great if you can attach your file for my reference and also I need Previous year trend in dotted line. Hope you will be able to help me out.

             

            Thanks,

            Ankit

            • 3. Re: Need to create a specific line Chart
              Ankit Jain

              Hi Hari,

               

              Please help me out asap, if possible.

               

              Thanks,

              Ankit

              • 4. Re: Need to create a specific line Chart
                Hari Ankem

                I think you are seeing nulls in TP Sales period. This seems to be happening with Tableau 10.1. I worked with 10.2 and didn't face that issue. So, I had to manually parse the string to a date. You can see it in the attached file.

                 

                And you don't have dotted lines in Tableau. That's why, lighter shades are used for previous year.