Last Modified Date: 19 May 2017
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.
- For "Tick Origin" select any date that is the last day of that week.
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials