2023: Week 3 - Solution
Solution by Tom Prowse and you can download the workflow here.
We continued our introductory month based around the Data Source Bank. This week we looked at including targets and combining the data sources to extend our analysis.
Step 1 - Transactions File
First we want to prepare the Transactions file input so that it is ready to combine with the Targets table.
After inputting the data we need to filter the table so the transaction code only contains values with 'DSB' in them. For this we can use a 'Wildcard Match' filter:
Next we want to update the Online or In-Person field from a number to a string. Once it is a string, we can then rename the fields where 1= Online and 2=In-Person.
Then we want to extract only the Quarter from the Transaction Date field. To do this we can make use of the in-built functionality within Tableau Prep that includes converting dates:
Finally, we want to find the total Value by Quarter and Online or In-Person so we need to use an aggregation
After the aggregation our transactions table is ready and should look like this:
Step 2 - Targets
Step 3 - Combining & Variance
We can then remove the duplicated fields (Transaction Date & Online or In-Person-1), and then finally calculate the variance between the actuals and targets:
Variance to Target
[Value]-[Quarterly Targets]
After this calculation we are ready to output our data: