View: Product Affinity

This article will help you learn about the fields available in the Product Affinity view, the field types, descriptions and how the fields are calculated

Key Topics

Click on the links below to take you to the section where you can learn more about this View and where it is used and how it is created

View Definition

This view is linked to the [drp.product_affinity] table which generated as part of the Daasity transformation process and has the following fields available/visible for use.

 

Field Name Field Type Description Source / Calculation
Primary Date Dimension Group Date or timeframe of the first order primary_order_date
Secondary Date Dimension Group Date or timeframe of the second order secondary_order_date
Affinity Type Dimension First to second order, or same cart affinity_type
Days Between Orders (Tiers) Dimension Days between orders first and second order in tiers - i.e. 1-10 days, 11-20 days, 21-30 days days_between_order_tiers
Primary Number of Units Dimension Number of units in the first order primary_num_units
Primary Product Name Dimension Name of Products in first order primary_product_name
Primary SKU Dimension SKUs in first order primary_sku
Secondary Number of Units Dimension Number of units in the second order secondary_num_units
Secondary Product Name Dimension Name of Products in second order secondary_product_name
Secondary SKU Dimension SKUs in second order secondary_sku
Average Days Between Orders Measure Days between first and second order AVG(days_between_orders)
Count Customers Measure Number of unique customers COUNT(DISTINCT(unique_customer_id))
Count Primary Orders Measure Number of first orders COUNT(DISTINCT(primary_order_id))
Count Secondary Orders Measure Number of second orders COUNT(DISTINCT(secondary_order_id))

Explores

This view is part of the following explores:

  • Product Affinity

Transformation Code

This view is a Daasity derived table generated by the following code:

  • [4320_BAS_ORL_product_affinity.sql]