Skip to content

Commit

Permalink
Update common.libsonnet
Browse files Browse the repository at this point in the history
  • Loading branch information
emre committed Apr 1, 2021
1 parent 9024d06 commit d1260bd
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,20 @@ local predefined = import 'predefined.jsonnet';
{ dimension: 'is_retained', operator: 'is', value: false, valueType: 'boolean' },
],
},
revenue: {
aggregation: 'sum',
ltv_revenue_total: {
aggregation: 'max',
category: 'Revenue',
column: 'event_value_in_usd',
sql: '{{dimension.ltv_revenue}}',
reportOptions: { formatNumbers: '$0,0' },
filters: [{ dimension: 'event_name', operator: 'equals', value: 'in_app_purchase', valueType: 'string' }],
},
ltv_revenue_d1: {
ltv_revenue_d7: {
label: 'D1 LTV',
sql: '{{measure.revenue}}/{{measure.all_users}}',
category: 'Revenue',
aggregation: 'average',
sql: '{{measure.ltv_revenue_total}}/{{measure.all_users}}',
reportOptions: { formatNumbers: '$0,0' },
filters: [
{ dimension: 'user_first_touch', operator: 'between', value: 'P1D', valueType: 'timestamp' },
{ dimension: 'user_first_touch', operator: 'between', value: 'P7D', valueType: 'timestamp' },
],
},
whales_playing: {
Expand Down

0 comments on commit d1260bd

Please sign in to comment.