• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Antichaos

Antichaos

Data Visualisation, Tableau & Data Services

  • Home
  • Blog
  • Services
  • Training
  • Portfolio
  • Contact
  • Nederlands
  • Show Search
Hide Search
Home » Blog » ISO weeks in Tableau

ISO weeks in Tableau

2017-06-30 by Johan de Groot

Tableau can handle all kind of dates and dateformats very well – but one option is lacking: the use of ISO8601 weeknumbers, the one which is used all over the world, especially in Europe. 

This formula will generate the right ISO weeknumber for you:

INT((Datepart('dayofyear', 
(dateadd('day',
INT(datediff('day', #1900-1-01#, [Date])/7)*7 
+ 3,#1900-1-01#))) + 6)/7)

Tableau Desktop interprets 12/31/2017 as week 53 of 2017 instead of week 1 for 2018 (per the ISO 8601 standard) – therefore you need to ‘compensate’ the year also:

If datepart('week',[Date])=53 
THEN datepart('year',[Date])+1 
ELSE datepart('year',[Date]) end

(if you want to have this resolved in Tableau itself: please vote for this must have feature on https://community.tableau.com/ideas/2992 UPDATE: this feature has been implemented in Tableau!

blog

Primary Sidebar

Antichaos Services

  • Need Tableau Help ?
  • Basic, Advanced and Custom Training

Recent Blogposts

  • Smarter dashboard design – with fewer tooltips
  • Top 2000 in Perspective – Behind the Scenes
  • How to Visualize High-Value Metrics in Tableau Without Starting at Zero
  • Why is COUNTD so slow – and how can I fix this?
  • Visualizing ‘Dynamic’ Data using a Sine Wave
  • Add ‘All’ and more options to a Dynamic Parameter
  • Tableau Container Art – 4 examples of formatting dashboards without images
  • Letting Users Choose Their Visual
  • The Tableau VizQL Data Service: What It Is, What It Can Do, and When to Use It
  • Abbreviate long text in Tableau

Antichaos

Copyright © 2026 Antichaos

  • Antichaos
  • Privacy
  • Contact