3 Replies Latest reply on Jun 20, 2019 8:11 AM by Tyler Garrett

    Fix tableau X axis

    Sergey Sheypak

      Hi, can't force Tableau to stop drawing confusing X-axis labels.


      I grouped my data by "Monday date", but Tableau draws 4th of July, 19th of July, .e.t.c.

      These dates are completly unrelated and suuuper confusing for the user.

      Can I force Tableau to draw 'Start of week' value, instead of something else?

        • 1. Re: Fix tableau X axis
          Jim Dehner

          Good morning

          please attach your twbx workbook so we can see what is going on



          • 2. Re: Fix tableau X axis
            Alvino Vaz

            Could you attach a sample workbook to help solve your issue?



            • 3. Re: Fix tableau X axis
              Tyler Garrett

              I won't need a sample workbook - I've played this game a few hundred times.


              You're using a continuous date and BAR CHARTS (i'm pretty darn sure anyways ), generally people use line charts for continuous dates (likely set to automatic - explained below), and a dimension for bars (which gives you more control - right click and click on the other month above the one you have selected). This will center up your content more efficiently, unless you're going for that look, and maybe that's the case. Here's a few solutions. I recommend going with DIMENSION because you're not needing a continuous line - which breaks into dots if you use a dimension. Considering you have a bar chart, i think this dimensions work better for bars.


              With continuous, content overlaps depending on what DATE it lands on.

              Screen Shot 2017-12-04 at 12.07.50 PM.png

              Notice the label on the far right isn't necessary, same with the far left. Also OCT1,14 seems to be taking up more space than anything else...


              With dimension: (i needed to make the SIZE OF FONT smaller to bring in that content - sure you can do it with continuous and I will let you play with that.)

              Screen Shot 2017-12-04 at 12.09.36 PM.png

              This seems to work better for bars in most cases.


              Check out this screen cap: the top half is DIMENSION, the bottom half (I'm highlighting it) is Continuous. It will start clicking the more you play with the product too.

              Screen Shot 2017-12-04 at 12.10.54 PM.png


              (if you're using a line chart, dimensions wont work because...)

              I'm over doing it a bit here just to show sometimes it's not going to work: (sometimes a line chart will get broken into pieces, and force people into using bar charts instead)

              Screen Shot 2017-12-04 at 12.12.42 PM.png

              If this happens, you get to toggle a bit between what I will show you below.


              Here are other methods:


              Continuous axis: Whenever the axis gets funky, I utilized floating TEXT and change the shading to whatever the background of the visualization is.

              Screen Shot 2017-12-04 at 11.56.47 AM.png

              Leave it blank.

              Screen Shot 2017-12-04 at 11.57.08 AM.png

              Format text object.

              Screen Shot 2017-12-04 at 11.57.24 AM.png

              And change the shading to X color.

              Screen Shot 2017-12-04 at 11.57.52 AM.png

              Now you can place this over confusing labels... If that's the case.


              But that's a bit wonky, you have more control over this element if you double click on the axis.

              Screen Shot 2017-12-04 at 12.01.07 PM.png

              Notice it's labeling per year.


              Double click the month of order date axis. And investigate by opening TICK MARKS.

              Screen Shot 2017-12-04 at 12.00.51 PM.png

              Now look what happened when i removed it from AUTOMATIC.

              Screen Shot 2017-12-04 at 12.01.01 PM.png

              Kind of weird right?


              Right click to format it.

              Screen Shot 2017-12-04 at 12.04.24 PM.png

              Sometimes making font smaller helps: It goes to 6 if you type it.

              Screen Shot 2017-12-04 at 12.14.30 PM.png


              Also swap alignment -  to get more space.

              Screen Shot 2017-12-04 at 12.26.07 PM.png


              Here's me now hiding the headers, to give the viz more ROOM to offer more ticks. And I did a right click on the axis, to "Edit Axis" or a double click will suffice. And i turned it to label per day.

              Screen Shot 2017-12-04 at 12.15.44 PM.png

              But having several years of data, and expecting it to label per day, can be a challenging request. So tableau does what it thinks it needs to do.

              So, maybe going with dimensions will be the best fit?


              Blue pills VS green pills, which is a dimensions VS continuous.


              Sometimes, maybe once or twice, I needed to swap off of continuous to Dimensions because I wanted to do conditional bucketing. Same with the covering up labels, maybe only once or twice.


              From my view, you're using continuous. And labeling for that can require a different format to get what you want. Right click format, right click edit axis, should take you down the path of success!


              If you're trying to START A WEEK with a new value.


              Start by generating that in your DATA.


              Do you have a DIM_TIME table in your EDW? If not, you can generate one in EXCEL, and start the week on whatever you see fit. Then repeat it per week, 1,2,3,4,5,6,7...


              Often times generating this in your ETL tool may take a few hours, or days if you're not familiar with the product. And I recommend generating it in excel and passing it to the DBA to proliferate in your database - or JOIN it to your new table and enjoy not having to flex Tableau so much.


              This solves 'multiple fiscal' flags too.

              Screen Shot 2017-12-04 at 12.20.15 PM.png







              2 of 2 people found this helpful