Last Modified Date: 17 Oct 2022
Environment
Tableau DesktopResolution
CLICK TO EXPAND OPTION 1
Option 1: Upgrade to Tableau Desktop 2018.2
As of the release of Tableau Desktop 2018.2, date functions now support ISO 8601 dates. For more information about the feature, see Gregorian Calendar vs. ISO 8601 Standard in Tableau Help.
To use ISO 8601 dates, upgrade to Tableau Desktop 2018.2 or a later version. For more information, see Upgrading Tableau Desktop in Tableau Help.
To use ISO 8601 dates, upgrade to Tableau Desktop 2018.2 or a later version. For more information, see Upgrading Tableau Desktop in Tableau Help.
CLICK TO EXPAND OPTION 2
Option 2: Create calculated fields
As a workaround, use calculated fields to convert week numbering to the ISO 8601 standard.
Please note that the following instructions are based on sample data and can be reviewed in the workbook attached below.
Please note that the following instructions are based on sample data and can be reviewed in the workbook attached below.
Step 1: Create a Calculated Field
- Select Analysis > Create Calculated field.
- Name the calculated field "ISO 8601 Week".
- Enter the following formula:
ROUND((DATEADD('day', 3, DATETRUNC('week',[Date]))- DATEADD('day', 3, DATETRUNC('year', DATEADD('day', 3, DATETRUNC('week',[Date])))) + DATEPART('weekday', DATEADD('day', 2, DATETRUNC('year', DATETRUNC('week',[Date])))) -4) / 7 + 1,0)
Step 2: Create a Calculated Field
- Select Analysis > Create Calculated field.
- Name the calculated field "Monday of Week".
- Enter the following formula:
DATETRUNC('week',[Date]-1)+1
Step 3: Build the View
Drag "Monday of Week" and "ISO 8601 Week" to the Columns shelf. Ensure "ISO 8601 Week" is set as Discrete.Cause
Tableau Desktop uses US standards for week numbers. The ability to format dates according to the ISO 8601 standard was added to Tableau Desktop 2018.2.Additional Information
For more information about ISO 8601, see the following information:- Week in, week out, Tableau in the Clear and Simply blog.
- ISO 8601 definition from Wikipedia.
Discuss this article... Feedback Forum
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials