Skip to content

Commit

Permalink
Add measures to test cumulative metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Jun 25, 2024
1 parent 4a5bddf commit 3b286ec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/functional/metrics/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,36 +751,42 @@
label: Rolling sum of visits over the last 7 days
type: cumulative
type_params:
measure: num_visits
cumulative_type_params:
window: 7 days
period_agg: average
- name: cumulative_orders
label: Rolling total of orders (all time)
type: cumulative
type_params:
measure: num_orders
cumulative_type_params:
period_agg: last
- name: orders_ytd
label: Total orders since the start of the year
type: cumulative
type_params:
measure: num_orders
cumulative_type_params:
grain_to_date: year
period_agg: first
- name: quarterly_orders
label: Rolling count of orders over the last quarter
type: cumulative
type_params:
measure: num_orders
window: 1 quarter
- name: visits_mtd
label: Count of visits since start of month
type: cumulative
type_params:
measure: num_visits
grain_to_date: month
- name: monthly_visits
label: Rolling sum of visits over the last month
type: cumulative
type_params:
measure: num_visits
window: 1 month
cumulative_type_params:
period_agg: last
Expand Down

0 comments on commit 3b286ec

Please sign in to comment.