2024: Week 43 - Solution



Solution by Tom Prowse and you can download the workflow here.


Step 1 - Sales

The first part of this challenge is to calculate the sales value for each product, the total sales per category, and then calculate the % of total for each category.

Sales 
ROUND([Price]*[Quantity],2)

Then we can use this field to calculate the sales per category using a fixed LOD: 

Category Sales
Now we have the category sales we can then calculate the % of total for each category: 

% of Total
ROUND([Sales]/[Category Sales],2)

The table should now look like this: 



Step 2 - Bottom 15% 

Now we can filter for the bottom 15% of sales in each category. Before we filter we need to calculate a running total on the % of total: 

Running % of Total



Then we can use this to filter and keep only the values where [Running % of Total]<=0.15

The last step is to remove any unrequired fields and our output should look like this:



After you finish the challenge make sure to fill in the participation tracker, then share your solution on Twitter using #PreppinData and tagging @Datajedininja@JennyMartinDS14 & @TomProwse1

You can also post your solution on the Tableau Forum where we have a Preppin' Data community page. Post your solutions and ask questions if you need any help! 

Popular posts from this blog

2024: Week 1 - Prep Air's Flow Card

2023: Week 1 The Data Source Bank

How to...Handle Free Text