Posts

Showing posts with the label week11

2020: Week 11 Solution

Image
You can view the full workflow described in the post below or download it here . You can also view a video guide above for a slightly alternate method. This workflow can be broken down into two halves, one for each output: 1. Calculating Boxes Per Order In order to calculate how many boxes of each size are required for order, we're going to apply the following steps: Append all sizes of box onto each order. Pivot the box sizes so we have one order per row with a field for each box size. Calculate the number of each box size required for each order. 1.1 Appending the box sizes. Add the 'Orders' and 'Box Sizes' inputs to the canvas. Add a Clean Step after each input and create a new [Join] field for us to join the two inputs together such that every [Box Size] gets appended to every row in the 'Box Sizes' table. [Join] 1    //A value to join on. Then simply join the two inputs together on this field....

2020: Week 11

Image
This week at C&B Suds Co we're looking to improve and streamline our soap packaging and delivery process. We want to figure out how we can minimise wasted box space and minimise the number of separate boxes per order - a variant of the knapsack problem ! The Challenge At C&B Suds Co we now use three different sizes of box for our soap orders: A bulk order box which can hold 120 soaps. A large box that can hold 24 soaps. A small box that can hold 6 soaps. For all of our orders we want to minimise the number of boxes we use per order. At the same time, we also want to try and minimise unused space in boxes.  For example, if an order came through for 32 bars of soap we could package this in 3 boxes: 1 large box of 24 soaps. 1 small box of 6 soaps. 1 small box of 2 soaps with the unused space for 4 soaps. We want two outputs:  an overview for each order of the number of each box size used; and one that gives the details for each individual box...

2019: Week 11 Solution

Image
The full solution flow can be seen below and downloaded here . The Full Workflow This week’s challenge served to showcase Tableau Prep’s versatility and prove that it can be used to fairly easily parse JSON data. Most of the steps required to complete the challenge were covered in the challenge’s requirements, so this week’s solution will gloss over these parts. Parsing and Cleaning the JSON JSON headers are always broken up using fullstops, so a Custom Split on every “.” easily breaks this up for us. There’s a reason we suggest breaking it up before filtering any rows. You could straight away filter on “ NOT CONTAINS( [JSON_Name] ,”meta”) ”, however if you split the JSON up first you can then easily click on and exclude unnecessary rows of data. From this view you can also easily remove any unnecessary information contained in the JSON_Name by identifying generated Split fields that only contain a single value. Removing fields that do not add any detail. Pivoting the ...