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

Antichaos

Data Visualisation, Tableau & Data Services

  • Home
  • Services
    • Data Analysis
    • Training
    • Portfolio
  • Blog
  • Extensions
    • Tally
    • Latch
    • ———–
    • How to install
    • Licensing
    • Security and Trust
  • Tutorials
    • Stretch
    • Tempo
    • Segue
    • Orbit
    • Changing Color Palettes in Tableau
    • Allowlist a Tableau Extension
      • Atlas extension – interactive demo
    • Tableau Image Roles
    • Atlas
    • Disable Tableau Highlight – using filters
  • About Johan
  • 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!

Get more out of your data?

I'm Johan - freelance data consultant behind Antichaos Data. I help you get Tableau and data work into shape: full projects, interim support, performance tuning, dashboard redesigns, training, or just an extra pair of hands when you're stuck.

Get in touch

blog

Primary Sidebar

Antichaos Services

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

Recent Blogposts

  • Smooth lines in dashboards: pretty but wrong
  • Transparent and colorful tooltips in Tableau
  • 5 Tableau habits you should change
  • Tableau parameters deserve better – meet Latch
  • Dashboard icons – pick one set, and use it well
  • Live News in Tableau – setup in 10 minutes
  • Stop using red vs green in dashboards
  • Tableau Toggle Button: 3 Ways to Build an On/Off Switch
  • The Tally extension: CountTo renewed
  • 5 more Tableau Desktop Tips: Fields, Calculations & Pills

Follow & Connect on

Antichaos

Copyright © 2026 Antichaos

  • Antichaos
  • Blog
  • Tutorials
  • Privacy
  • Extensions
  • Contact