Gantt Bars do not Line Up Correctly When Date Field is set to a Date Level Other than DAY
Published: 21 Sep 2017
Last Modified Date: 25 Sep 2017
IssueWhen creating a Gantt chart where the date field is set to a date level other than DAY, then the Gantt bars in the view are not aligned with the date axis as expected.
For example, in a Gantt chart where each bar is the length of time between when an order is placed and when an order is shipped, all of the bars begin on the first day of the month despite the fact that orders occurred all during the month.
ResolutionChange the date level to DAY. If desired, format the axis to show date labels at the month level.
The attached example workbook uses the sample data set Superstore to demonstrate the following directions:
- Right-click MONTH(Order Date) on the Columns shelf and select the second DAY option.
- Right-click DAY(Order Date) on the Columns shelf and select Format…
- In the left-hand Format pane, for the Dates dropdown specify the desired date format. In this example, the custom date format "mmmm" is used.
- Right-click the date axis at the bottom of the view and select Edit Axis…
- In the Edit Axis dialog, do the following and click OK:
- Navigate to the Tick Marks tab
- For Major tick marks, select Fixed
- For Every, select 1 Months
CauseTableau Desktop truncates dates to the date level selected. For example, if the date is 1/20/2018, and the MONTH level is selected, then the Gantt bar will start on 1/1/2018.