How to Report on Week End Date in Tableau

By: Eric Parker

Pro Headshot.jpg

Eric Parker lives in Seattle and has been teaching Tableau and Alteryx since 2014. He's helped thousands of students solve their most pressing problems. If you have a question, feel free to reach out to him directly via email.

It seems like just about every organization I work with has a little twist to the way they like their dashboards presented which varies slightly from the next organization. Recently, I was working with a team that largely provided their reporting on a weekly basis and displayed the Week End date in a DD-MMM format.

Notice that if I display sales by Week (Date Value/Discrete) and Category, the week start date is listed for each column.

 
140-1.png
 

The trick to getting the week end date to display is creating a custom calculation. Let’s break the below formula down:

●        DATETRUNC is used to truncate the data at a weekly level (i.e. the first day of the week/Sunday).

●        DATEADD is used to add one week to that date (i.e. the following Sunday).

●        DATEADD is used again to take one day off the following Sunday (i.e. the last day of the week/Saturday).

140-2.png

You can then display data in the MDY fashion to see sales listed by the last day of the week.

 
140-3.png
 

Now if we want the custom formatting (DD-MMM) we will need to set the [Week End] calculation to Date Value Day and make it a Discrete field.

 
140-4.png
 

Then we can right-click on the [Week End] pill on Columns and select “Format…”.

 
140-5.png
 

Then you’ll want to make sure the “Header” tab is selected in the Formatting window, choose custom formatting and insert DD-MMM into the dialogue.

140-6.png

Need help tackling your own customization? Sign up for an office hour and we’ll work on them with you!

Thoughts on Accessing and Visualizing Public Data

Color a Selected Data Point in Tableau

0