KNOWLEDGE BASE

Unable to Display End Months on Axis Where There Is No Data


Published: 02 Mar 2017
Last Modified Date: 07 Mar 2017

Issue

When a Year To Date view by Month is created in Tableau Desktop, if there is no data for January and February, these months do not appear on the X-axis as desired.

Environment

Tableau Desktop

Resolution

To extend the X-axis to accommodate the Reference line, and display Jan & Feb on the view, please follow the steps below, place an 'Invisible Reference Line' at a value of Jan 1, 2017 on a continuous MONTH(DateTime) axis.

Step 1: Create a Parameter

  1. Right-click in the Data pane and select Create Parameter
  2. Name the Parameter as desired, then do the following, and click OK
    • Data Type: Date & Time
    • Current Value: Manually navigate to the first day of the missing month. In this example: 01/01/2017
    • Display Format: Automatic  
  3. Right-click this new parameter and select Show Parameter Control

Step 2: Add a Reference Line

  1. Right-click on the X-axis and select Add Reference Line.
  2. In Value, select the parameter created in step 1. 
  3. In Label, select None to remove the title of the parameter on the view. 
  4. In Line, select None to remove the vertical line that appears on top of January. 

Cause

Automatic Axis scaling will extend from the MIN value to the MAX values in the domain for the field used on the Axis. To Extend the Axis beyond these values, the axis must be fixed, or a reference line added to the Axis at a location outside the domain of the field.

Additional Information

The steps detailed in this article can be reviewed in the attached workbook. 
Did this article resolve the issue?