2 Replies Latest reply on May 10, 2012 6:12 AM by ernesto debeaumarchais

    Line graphs without breaks at year

    ernesto debeaumarchais

      This has been addressed partly before.  This is the issue with having line graphs break at the year mark when you have Year and Month on the columns.




      The only way I can get around it is to combine Year and Month into one field:




      The issue then is that I would like to have lines or bands to indicate the separation between years:



      I can't figure out a way to do it.  With the combined field, I am not able to add a reference line on the x-axis.  Is there a way to do this?  I have attached a simple workbook - sheet 2 would be what I'm looking for, with a line reference line between years, or one shaded and one not, etc. 


      Is there a newer better way to do this without using a combined Year-Month field maybe?  I saw this post below:


      Joe Mako said: "I believe Tableau Version 7 adds the interaction you are looking for, have you tried the beta yet?  Until version 7 is released, you will need to use the method Richard demonstrates in the above link, as in the attached workbook."

      Was there a change in Version 7?

        • 1. Re: Line graphs without breaks at year
          Alex Kerin

          Yes there was a change in Tableau 7. You can achieve the same results in 6 by using a calculation like


          Datetrunc('month',[your date field]) and setting it as exact date.


          I cannot show you how to do this on your worksheet as you need to post a tbwx (save as) that includes the dataset.

          • 2. Re: Line graphs without breaks at year
            ernesto debeaumarchais

            I edited the original post and replaced the attachment with the packaged file.  On Sheet 4, I used the exact date approach.  Then I put Date on the level of detail - had to make it an attribute, or else you get the year breaks again.  But when I try to put yearly reference lines in, I can only do min, max, or constant.  So I can get a reference line for the first year, but that's it.  So Sheet 4 is what I'm basically looking for, except with ref lines at each year's start.