Skip to content

Commit

Permalink
format numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
emre committed Apr 5, 2021
1 parent fea474a commit 31781f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ local predefined = import 'predefined.jsonnet';
label: 'Total Revenue',
category: 'Revenue',
sql: '{{dimension.ltv_increase}}',
reportOptions: { formatNumbers: '$0,0000' },
reportOptions: { formatNumbers: '$0,0[.]0000' },
},
ltv_revenue: {
label: 'LTV',
category: 'LTV',
sql: 'IEEE_DIVIDE({{measure.total_revenue}}, {{measure.all_users}})',
reportOptions: { formatNumbers: '$0,0000' },
reportOptions: { formatNumbers: '$0,0[.]0000' },
},
ltv_revenue_d7: {
label: 'D7 LTV',
category: 'Revenue',
sql: '{{measure.ltv_revenue}}',
reportOptions: { formatNumbers: '$0,0000' },
reportOptions: { formatNumbers: '$0,0[.]0000' },
filters: [
{ dimension: 'days_since_signup', operator: 'lessThan', value: 8, valueType: 'integer' },
],
Expand Down
10 changes: 5 additions & 5 deletions predefined.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -175,36 +175,36 @@
aggregation: 'sum',
label: 'IAP Revenue',
column: 'event_value_in_usd',
reportOptions: { formatNumbers: '$0,0' },
reportOptions: { formatNumbers: '$0,0[.]00' },
},
transaction_count_per_paying_user: {
sql: 'IEEE_DIVIDE({{measure.total_transactions}}, {{measure.paying_users}})',
},
average_transaction_per_paying_user: {
sql: 'IEEE_DIVIDE({{measure.revenue}}, {{measure.paying_users}})',
reportOptions: { formatNumbers: '$0,0' },
reportOptions: { formatNumbers: '$0,0[.]00' },
},
revenue_from_retained_users: {
aggregation: 'sum',
column: 'event_value_in_usd',
filters: [
{ dimension: 'is_retained', operator: 'is', value: true, valueType: 'boolean' },
],
reportOptions: { formatNumbers: '$0,0' },
reportOptions: { formatNumbers: '$0,0[.]00' },
},
revenue_from_new_users: {
aggregation: 'sum',
column: 'event_value_in_usd',
filters: [
{ dimension: 'is_retained', operator: 'is', value: false, valueType: 'boolean' },
],
reportOptions: { formatNumbers: '$0,0' },
reportOptions: { formatNumbers: '$0,0[.]00' },
},
revenue_from_whales: {
aggregation: 'sum',
column: 'event_value_in_usd',
filters: [{ dimension: 'is_whale', operator: 'is', value: true, valueType: 'boolean' }],
reportOptions: { formatNumbers: '$0,0' },
reportOptions: { formatNumbers: '$0,0[.]00' },
},
revenue_whales_ratio: {
sql: 'IEEE_DIVIDE({{measure.revenue_from_whales}}, {{measure.revenue}})',
Expand Down

0 comments on commit 31781f6

Please sign in to comment.