From 7e7350b40b8c5fb4565a513dbbb9f04980bdad4c Mon Sep 17 00:00:00 2001 From: rpourzand Date: Thu, 18 Jul 2024 01:38:57 +0100 Subject: [PATCH] Update order_items.yml --- models/marts/customer360/order_items.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/models/marts/customer360/order_items.yml b/models/marts/customer360/order_items.yml index 9c52936..160db32 100644 --- a/models/marts/customer360/order_items.yml +++ b/models/marts/customer360/order_items.yml @@ -41,7 +41,10 @@ semantic_models: expr: case when is_drink_item = 1 then product_price else 0 end - name: median_revenue description: The median revenue generated for each order item. - agg: median + agg: percentile + agg_params: + percentile: .5 + use_approximate_percentile: True expr: product_price groups: @@ -73,12 +76,11 @@ metrics: type_params: measure: order_cost - name: median_revenue - description: The median revenue generated for each order item. - agg: percentile - agg_params: - percentile: .5 - use_approximate_percentile: True - expr: product_price + description: The median revenue for each order item. Excludes tax. + type: simple + label: Median Revenue + type_params: + measure: median_revenue - name: food_revenue description: The revenue from food in each order label: Food Revenue