openfoodfoundation / inception-pipe

The inception pipe manages the product, design & tech work that happens prior to an issue enters the delivery pipe.
1 stars 0 forks source link

Analytics > Setup Ratio KPIS with Metabase #6

Closed jaycmb closed 3 years ago

jaycmb commented 3 years ago

Description

As an instance manager / PM I would like to track metrics for specific ratios over time (weekly or monthly base) using Metabase. This will help to compare how these numbers develop our time, making it easier to detect changes.

Currently ratios are in SQL, but this seems to not allow to use the Metabase functionality to group (e.g. by completed at per week) and filter (by specific time range).

This issue includes the setup of these KPIs

Acceptance Criteria

jaycmb commented 3 years ago

During implementation it became clear, that "complex" ratios that include 2 different dimensions (e.g. orders per customer, based on Spree_Orders and Spree_Customers) can not use Metabase filter functionalities or visualization like graphs over time or trends.

See Screenshot example, bottom right, filter for AVG # of Orders / Customer does not work

image

Currently Last Month´s AVG Order per Customers is hard coded (we decided for last month in order to always have a full month period for comparability), but maybe there is a way to create this query using the editor so that we can use trends, filter for different time slots etc . Technically we would need an "Average of" the Count of this query. Maybe @sauloperez you can find a solution?

Not that this is standalone a super urgent metric, but if we solve it for this one, the approach can probably be applied for many other cases

AVG Order Size works, as it is a simple Average over Total Orders

Items per Order still open