3 Replies Latest reply on Feb 5, 2015 7:16 AM by juliette.mccormack

    Chart Times by Date

    John Meredith

      Hi there,

      I have a list of times in the from of a datetime field which marks the Start of a shift. I want to plot the variance in this start time but am really struggling to do it. In the most simple form, I would like a line chart of dates on the x axis (e.g. 01/04/14, 02/04/14...), with the start time on the Y axis (08:10, 09:14, 08:26 etc) and be able to run averages etc for each week/month etc.

       

      It seems to simple and yet is so hard?! Help appreciated!

        • 1. Re: Chart Times by Date
          juliette.mccormack

          Hi John

           

          Can you please post a packaged workbook with a sample of your data?  I'm not sure of the structure of your data, eg, whether you have lots of shifts starting each day (early and late shifts for example) and lots of staff.

           

          However, I have made up a bit of data and come up with this:

          1.jpg

          My method for extracting the time is a bit long winded!  There's probably a better way.

           

          BW

          Juliette

          1 of 1 people found this helpful
          • 2. Re: Chart Times by Date
            John Meredith

            Hi juliette.mccormack - I got there too with some googling and found this:

             

            Show Seconds as hh:mm:ss

             

            I think being a Tableau newbie I finding the differences between dimensions, continuous variables etc hard to get my head around. Now I have a chart that looks identical to yours (but with different data).

             

            So in your example, how can I plot that as a continuous line chart?

            • 3. Re: Chart Times by Date
              juliette.mccormack

              It's already a continuous measure in my workbook.  The green pill identifies it as continuous rather than discrete and a green pill creates an axis (the bottom of the menu shown in the image shows it as Continuous). 

               

              So, you should be able to just change the type on the Marks card to line:

               

              1.jpg

              If that doesn't work, if you'd like to attach a workbook with your sample data, I'd be happy to look at it.

               

              BW

              Juliette