Axis Shows The Previous Date Of The Mark When Filter Date To 2 Days
Published: 19 Mar 2021 Last Modified Date: 19 Mar 2021
Issue
When filter date to 2 days, the axis shows the previous date of the marks
For example: filter Order Date to 2020/12/29 - 2020/12/30, the axis shows 2020/12/28 and 2020/12/29
Environment
Tableau Desktop
Resolution
Option 1
Right click on DAY([Order Date]) and change to Exact Date
Option 2
Right click on DAY([Order Date]) and change to Discrete
Option 3
Right click on axis Day of Order Date > Edit, and set Fixed end as bellow
Cause
For continuous date axis with automatic range, Tableau Desktop will keep blank space at both end. Therefore, when filter Order Date to 2020/12/29 - 2020/12/30, the range of axis turns to 2020/12/28 10:45:03 PM - 2020/12/30 1:14:56 AM, while the mark will be put at 2020/12/29 00:00:00 and 2020/12/30 00:00:00. Meanwhile, the space of axis is only enough to show 2 dates, because it needs 24 hours of axis between 2 dates, but the range of axis is only 26.5 hours. Thus, the axis only shows 1st date (2020/12/28) and 2nd date (2020/12/29), and because the position of the date showed on axis is near 00:00:00 of the next day, it looks like the mark is put on previous date.
Thank you for providing your feedback on the effectiveness of the article.