Sections in this category

Change Metric Grain (Dataset Aggregation)

  • Updated

 

This is a guide for the Change Metric Grain feature. Sisu’s goal is that you can reduce your time to analysis ‘Run’ without having to write cumbersome queries. Now you can easily aggregate your metric’s dataset to analyze it at a different grain, without having to write a new custom query. 

The grain of the metric should be the grain of the dataset being analyzed (e.g. average order value by customer-day at the customer-day grain). You can iterate on existing metrics as a base (aggregating up) or define a new metric on a fine-grained dataset. Sisu automatically aggregates the analysis dimensions and you can choose which ones to apply given the analysis dimension data type. 

Sisu automatically determines most datasets’ primary keys. If not, you’ll need to define it in the Data Library using the actions menu. Sisu will validate that the primary key is correct. 

Instructions

  1. Create a metric from a dataset or duplicate an existing metric. In this example, we’re using a purchases dataset at the transaction-level grain. But we want to analyze a metric at a coarser grain, like customer or customer-day. 
    mceclip0.png
    mceclip1.png
  2. The metric is defined using the selected dataset. The primary key indicates the grain of the base dataset. In our example, we change that field to the desired grain. mceclip2.png
  3. We’ve changed the grain to customer_id and can now choose aggregation functions for the dimensions. In the background, Sisu is applying a group-by to the dataset. Sisu applies default functions as a starting point, such as average for numeric dimensions.                                              mceclip3.png
  4. Click “Preview dataset” for the derived dataset. Now we see the data generated by applying the aggregation functions at the desired grain. In this case, we tried the purchase_time, store_id grain. mceclip4.png
  5. Now run the new metric! Dimensions are named with their aggregation functions applied. Sisu automatically applies keyword transformations to the aggregated string dimensions. mceclip5.png
  6. We’ve created a metric at the customer grain, but we could also create it at the customer-day, store-week, or any number of other combinations that help us answer our business question using Sisu. mceclip6.png
  7. Note that no SQL was required to change the metric’s grain. Should you wish to iterate on the query as a starting point and customize it, you can copy the code in the SQL preview. mceclip7.png

Beta Requests

  1. Please try the feature when you are iterating on existing metrics (duplicate and change grain) or creating new ones from scratch using granular base datasets. 
  2. Let the Sisu Customer Success team if the feature is useful for your metric creation and if you encounter any issues. We are here to help and appreciate any feedback.