Week to Date (WTD) versus Previous Week to Date (PWTD) in Tableau
top of page
  • Bernard K

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

Updated: Nov 29, 2022


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.

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!

Blog.png
Black & white.jpg

About Me

More About the Author

Bernard K

Analytics Consultant | 3X Tableau Certified

Bernard is a data analytics consultant helping businesses reveal the true power of their data and bring clarity to their reporting dashboards. He loves building things and sharing knowledge on how to build dashboards that drive better outcomes.

Let’s discuss your data challenges! Let’s work together!

bottom of page