top of page

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

Writer's picture: Bernard KilonzoBernard Kilonzo
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.

tableau view

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.

tableau view

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.

If you like the work we do and would like to work with us, drop us an email on our Contacts page and we’ll reach out!

Thank you for reading!

Original.png

We Support You Deliver Business-Focused Solutions That Enable Data-Driven Decision Making.

  • Tableau profile
  • YouTube
  • White LinkedIn Icon
  • Facebook
  • X

QUICK LINKS

CONTACT US

+254 738 307 495

East Gate Mall, Donholm

3rd Floor Suite No. 3i

Nairobi, Kenya

Join our mailing list

bottom of page