Last Modified Date: 06 Sep 2019
AnswerThe attached example workbook uses the sample data set Superstore to demonstrate the following two options:
Option 1: For discrete week bins
- Create a calculated field named "End of Week Display Date" and add a formula similar to:
DATEADD( 'day', -1, DATEADD( 'week', 1, DATETRUNC( 'week', [Order Date] )))
- NOTE: Starting from the inside out, the above calculation first truncates dates to the first day of the week. Then the DATEADD() function adds 1 week, which will move the dates to the first day of the following week. And finally we subtract one day, which will move the dates to the last day of the original week.
- Right-click and drag [End of Week Display Date] to the Rows shelf
- In the Drop filed dialog, select MDY(End of Week Display Date)
Option 2: For continuous data axes
- Right-click on the date axis in 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 Weeks.
- Note: starting from 2018.1 and later versions, select 1 (as Intervals) Weeks.
- For "Tick Origin" select any date that is the last day of that week.
Additional InformationTo view the above steps in action, see the video below.
Note: the video has no sound.
Discuss this article...
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials