2 Replies Latest reply on Nov 27, 2012 3:09 AM by Nasruddin Durani

    How to split the data and plot the graphs based on date

    Nasruddin Durani

      Hi,

       

      I have the data for three years (i.e from 2010 to 2012) with a date variable in 'YYYY-MM-DD' format, I want to split the data into three parts i.e 2010-1 part, 2011 -2 part and 2012 -3part and also plot the graphs to do a comparison on Year on Year performace.

       

      I am only able to plot a single line graph from 2010 to 2012 with the data I have, Please let me know using calculated field, how can I split the data and the plot a line graph to compare the YOY performance.

        • 1. Re: How to split the data and plot the graphs based on date
          Mark Holtz

          Hello Nasruddin,

           

          To restate what you are saying, you have 1 measure that you want to be able to show as 3 separate lines in a line graph? You could create 3 separate measure fields:

           

          2010 measure:
          IF YEAR([DateField]) = 2010 THEN [Measure] ELSE NULL END


          2011 measure:
          IF YEAR([DateField]) = 2011 THEN [Measure] ELSE NULL END

           

          2012 measure:

          IF YEAR([DateField]) = 2012 THEN [Measure] ELSE NULL END

           

           

          Then, drag the Measure Values field onto the Rows Shelf and turn off all measures but these 3. Put your [DateField] on the columns shelf and set it to show Month (as a discrete dimension--make sure the pill is blue). This will force the lines to overlap. (If you bring year into the Columns shelf, they will NOT overlap.)

           

          If that does not get you what you need, please post a packaged workbook with your example.

          • 2. Re: How to split the data and plot the graphs based on date
            Nasruddin Durani

            Hi Mark,

             

            Thanks a lot , the solution which you gave is working perfectly fine.