Skip to content

Instantly share code, notes, and snippets.

@patrikbraborec
Created November 8, 2022 08:36
Show Gist options
  • Save patrikbraborec/7da7d52649fcdb0f577a23bf7ca2ac26 to your computer and use it in GitHub Desktop.
Save patrikbraborec/7da7d52649fcdb0f577a23bf7ca2ac26 to your computer and use it in GitHub Desktop.
- name: revenue
label: Revenue
model: ref('revenue_all')
calculation_method: sum
expression: price * quantity
timestamp: date
time_grains: [day, week, month, quarter, year]
dimensions: [
order_id,
order_status,
date,
campaign_id,
customer_id,
product_id,
price,
quantity,
customer_name,
state,
region,
product_name,
category
]
filters:
- field: order_status
operator: '='
value: "'Delivered'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment