Get Ready For Your Tableau Certification
  • Bernard

Week to Date (WTD) versus Previous Week to Date (PWTD) in Tableau


week to date (wtd) versus previous week to date (pwtd) in tableau

In this article, I will show you how to compute week to date (WTD) and previous week to date (PWTD) values using Tableau date diff() function.

Using the Sample-Superstore data, you can compute WTD sales using the formula below.

Computing WTD

computing week to date in tableau formula

Adding this calculation to the label shelf returns 4,531 which is the total sales between September 26th, 2021 (start of this week) and Today (date of publishing the article) September 30th, 2021.

Computing PWTD

previous week to date formula in tableau

Adding this calculation to the label shelf returns 19,613, which is the total sales between September 19th,2021 (Start of last week) and date equivalent to today in the previous week i.e., September 23rd, 2021.

With these two calculations you can compute, sales difference between WTD sales and PWTD sales as shown below.

computing difference between week to date values and previous week to date values

Or compute percent sales difference between WTD sales and PWTD sales as shown below.

computing percent difference between week to date values and previous week to date values

I hope this article was helpful to you. To receive more of the Tableau tips kindly join our mailing list by subscribing below.

Thank you for reading.

LEAD MAGNET - 2.png
FREE INTRO COURSE -2.png