Create model sourcing splits

You can create views to calculate how much product comes to customer from a given source, and what percentage of the product is going to that customer. This information can then be inserted into the model sourcing policies table in Supply Chain Modeler.

Step 1: Aggregate the order quantity

Create a dynamic view that aggregates and groups the order quantity by source, destination, and product. Filter the view to only include customer destinations.

  1. Create a dynamic view to use for the aggregation. For this example, we use "1_SS1_QuantPerSDP". The "1_SS1_" prefix is used to help keep views in order in lists and "SS" stands for sourcing split.

  2. In the view properties, create a join between the location_dimension_Ckey field from the destination table to the destination_location_dimension_Rkey field in the orders_full table.
  3. In the dynamic view properties, add the following columns from the orders_full table:
    • source_location_dimension_Rkey
    • destination_location_dimension_Rkey
    • product_dimension_Rkey
    • item_quantity
  4. For the item_quantity column, add the Sum function to aggregate the quantity. Name the column SumQty. Your column specifications should now be similar to this:

  5. Add a conditional statement to specify customer locations. Your Conditions specification should be similar to this:

Step 2: Calculate the percent of total order quantity from a source for each destination

Next, create a new dynamic view to include a percent of total order quantity for each destination/product combination by adding the following statements to the dynamic view, where "1_SS1_QuantPerSDP" is the name of the dynamic view created in Step 1, and SumQty is the column being summed in that view. The PartitionBy function separates the summations by destination/product combinations.

  1. Create a new dynamic view to calculate the percentage of product from a source. For this example, we use "1_SS2_PercentProductFromSource". The "1_SS" prefix is used to help keep views in order in lists and "SS" stands for sourcing split.

  2. In the dynamic view properties, add the following columns from the "1_SS1_QuantPerSDP" view you created in Step 1:
    • source_location_dimension_Rkey
    • destination_location_dimension_Rkey
    • product_dimension_Rkey
    • SumQty
  3.  Add this statement in the view's Columns section to aggregate totals by destination and product.
    SumPartitionDP: [1_SS1_QuantPerSDP].SumQty.Sum().PartitionBy([1_SS1_QuantPerSDP].destination_location_dimension_Rkey, [1_SS1_QuantPerSDP].product_dimenstion_Rkey)
  4. Add this statement in the view's Columns section to calculate the percent from source.
    PercentFromSource: [1_SS1_QuantPerSDP].SumQty/[1_SS1_QuantPerSDP].SumQty.Sum().PartitionBy([1_SS1_QuantPerSDP].destination_location_dimension_Rkey,[1_SS1_QuantPerSDP].product_dimension_Rkey)

    The Columns section of the view should now look similar to this:

Last modified: Friday May 12, 2023

Is this useful?