By: Eric Parker
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.
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).
You can then display data in the MDY fashion to see sales listed by the last day of the week.
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.
Then we can right-click on the [Week End] pill on Columns and select “Format…”.
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.
Need help tackling your own customization? Sign up for an office hour and we’ll work on them with you!