Arthi, do you need to include full days for both Fridays in the last column?
Thank you looking through the question and replying.
I apologize, for not mentioning correctly. We need to include only one Friday for the whole week average. Does that make sense?
Please let me know how it can be done..
So, what would be the start and end of the week, i.e. Sunday to Saturday, and would that be different from the 7-day period specified in the last column, i.e. Saturday to Friday?
Yes, it would be a Saturday to Friday week. And compare the previous day with previous Saturday to Firday Week.
Please let me know if you have any questions
For better understanding, I tried attaching my workbook but itseems like it is too large to be uploaded. I tried zipping too but no luck. If you have ideas on how the above tabel calculations can be done, it would help me a lot complete it.
- The week period to be considered would be full Saturday to full Friday
- The weeks to be considered would be the current and previous two weeks.(if there is data)
- I wanted it to be a automated daily update with yesterday's data.
- I wanted the table to look similar to the one below
Yesterday (for eg: Sunday) % W/W Last Wk¹s (for eg: Sunday vs. last Sunday)
%Last Week's Avg
(for eg Sun v/s Last Week Sat to Fri Avg)
Thank you for looking in to this..
Attached is one possible solution, for one measure (Sales). You can repeat it for all other measures, but you'll have to use a dashboard to show them together if you want it to look like your mock-up.
The main complication is non-standard week, as Tableau is not flexible with week definition - Tableau's week is Sun to Mon.
The general steps to solution are:
- Create a date field to shift dates to desired start of week
- Based on the above, create custom week numbers field
- Create custom calculations to get sales for Sundays, yesterday, etc.
- Use table calculations to calculate difference from previous period
- Set up the sheet with the above measures
- Set aliases for measure names to display the desired measure labels
- Create a special field (Show current week) to allow filtering the view to show only current week, but keep the data for previous week in the background, and configure the filter.
Thank you so much for pulling this together. Really appreciate your time and help.
I was able to create a small data set for what I am trying to do. I was able to do some things but would require your help in combining the rest. Can you please help take a look and provide your comments.
My questions are in the worksheet, in the captions.
Please let me know how we can solve this.. thank you so much for your help.
SampleWeek.twbx.zip 36.9 KB