3 Replies Latest reply on Oct 3, 2016 6:58 AM by Shinichiro Murakami

    Automation of reference lines in Tableau 10

    Brendan Cleary

      Please refer to the attached file.   There are two sheets ‘Stack_1’ and ‘Stack_2’, I want to input a vertical reference line at 12am and 6am for each sheet, respectively.   I have added the 12am reference line in the ‘Stack_1’ sheet manually for each day and in the ‘Stack_2’ sheet broken it out by day but there is a gap between the graphs which I would rather not have.

       

      Can anyone advise whether the reference line can be duplicated automatically at 12am for each day in ‘Stack_1’ rather than doing it manually each time or how can I remove the gaps between the each graph for 6am in ‘Stack_2’? 

        • 1. Re: Automation of reference lines in Tableau 10
          Shinichiro Murakami

          This is one of the difficulty of area graph.

          When you use discrete axis, always showing the gap between the pane.

          No way to remove the gap if you add 2nd dimension.

           

          And if you use continuous axis, there are no gap.

          And to show some reference line -like vertical line, you can use grid line.

           

           

           

           

           

           

          You can puck appropriate size, color here.

           

          Below is final VIZ.

          Thanks,

          Shin

          2 of 2 people found this helpful
          • 2. Re: Automation of reference lines in Tableau 10
            Brendan Cleary

            Thanks for the helpful info. The specified item was not found. Now for a follow up question!

             

            I would also like to have a second grid line or reference line. Refer to the attached image, I used the grid line for the 6am Datetime and manually used a reference line for the 12am Datetime but ideally I would like to have both vertical lines(whether it be a reference or grid line) as the data is dynamic.    Any further insight would be appreciated.   

             

             

            Capture.png

            • 3. Re: Automation of reference lines in Tableau 10
              Shinichiro Murakami

               

              First I thought I can add 2nd grid with dual axis, but it failed.

              Then I propose to add reference line.

              You don't need to add each time by manual "as long as" the range is always 7 days or as fixed range.

               

              I meant you can add dynamic ref line with below formula.

               

              [Ref0]  // this is 12:00 am as ref line.  In case of 6:00 am as ref line,    date({fixed:min([DELIVERY_DATETIME])})+6/24

              date({fixed:min([DELIVERY_DATETIME])})+0

               

              [Ref1]

              date({fixed:min([DELIVERY_DATETIME])}+1)+0

              *

              *

              *

              [Ref7]

              date({fixed:min([DELIVERY_DATETIME])}+7)+0

               

               

              In case your range is alway increasing, it will not work from 8th point, unfortunately.

              (I hope it's not)

              Oppositely, even in case your filtered range is less than 7 days, it will show 7 days range all the time based on  [Ref7].

              That's the disadvantage of this Ref line option.

               

               

              Finally, to limit the range with filter, you need to change that to "context filter" to make filter work before LOD calc.

               

               

              Thanks,

              Shin

              2 of 2 people found this helpful