Suki, I'm not sure there's an actual question in your post! However, I think I know what you're getting at.
You are VERY close to the right answer. The key is getting your custom calendar file right, then making sure that the DATE fields in your SQL table and GA data are all of the same type.
1) The custom period spreadsheet. You need to account for every single day in this spreadsheet, so one row per day. That row should contain the following columns:
Key, Date, Year, Period, WeekNum, Year_Start, Year_End, Period_Start, Period_End, Week_Start, Week_End
You don't need "Day of Week" - you can calculate that in Tableau when necessary. This format means that every single row contains all the information you need to figure out where in the custom calendar you are relative to the year, period and week.
The "Key" field is what you will use to join this spreadsheet to the SQL and GA data. It is a copy of the DATE field.
2) Your SQL table is very likely formatted as a DATETIME field, and you won't be able to join it to a plain DATE field. Create a copy of the field (in Tableau) and format it as DATE (or change the type of the existing column to DATE in Tableau).
3) Get your GA date field to match the spreadsheet format - probably needs another calculated field.
Once those are done, start a join with the custom calendar spreadsheet as the left side of the join, and connect your SQL data and your GA data on the KEY field.
That should get you started!
Hope you had a great weekend...
I totally forgot to reply to you on this to say thankyou (!!) - suffice to
say I've still not tackled (still in process!) it but I understand what you
are saying - I've not actually joined data is this way - but had to do it
with Google Analytics data so I think I understand what I need to do......
On 12 September 2017 at 14:36, Michael Gillespie <
1 of 1 people found this helpful
Suki, glad to hear this is what you needed. If it turns out to be the exact answer, please come back to this post and mark it as "Correct Answer" so others can find it and it drops off the "Unanswered Questions" queue.
Sure will do
On 18 September 2017 at 12:54, Michael Gillespie <