|
| 1 | +# Visit https://docs.rilldata.com/reference/project-files to learn more about Rill project files. |
| 2 | + |
| 3 | +title: "Customer Unit Economics Dashboard" |
| 4 | +model: "metrics_margin_model" |
| 5 | +type: metrics_view |
| 6 | +default_time_range: "P4W" |
| 7 | +smallest_time_grain: "day" |
| 8 | +timeseries: "__time" |
| 9 | +measures: |
| 10 | + - label: "Total Cost" |
| 11 | + expression: "SUM(cost)" |
| 12 | + name: measure |
| 13 | + description: "The sum of cost" |
| 14 | + format_preset: currency_usd |
| 15 | + - label: "Total Revenue" |
| 16 | + expression: SUM(revenue) |
| 17 | + name: total_records |
| 18 | + description: The sum of revenue |
| 19 | + format_preset: currency_usd |
| 20 | + - label: "Net Revenue" |
| 21 | + expression: "SUM(revenue) - SUM(cost)" |
| 22 | + name: measure_2 |
| 23 | + description: "The sum of revenue minus the sum of cost" |
| 24 | + format_preset: currency_usd |
| 25 | + - label: "Gross Margin %" |
| 26 | + expression: "(SUM(revenue) - SUM(cost))/SUM(revenue)" |
| 27 | + name: measure_1 |
| 28 | + description: "Net revenue divided by sum of revenue" |
| 29 | + format_preset: percentage |
| 30 | + - label: "Unique Customers" |
| 31 | + expression: "COUNT(DISTINCT company)" |
| 32 | + name: measure_3 |
| 33 | + description: "The count of unique companies" |
| 34 | + format_preset: humanize |
| 35 | +dimensions: |
| 36 | + - label: Customer |
| 37 | + column: company |
| 38 | + description: "The name of the customer" |
| 39 | + - label: Plan Name |
| 40 | + column: plan_name |
| 41 | + description: "The name of the billing plan" |
| 42 | + - label: "Cost by Region" |
| 43 | + column: "location" |
| 44 | + description: "The region incurring costs" |
| 45 | + - label: Cost by Component |
| 46 | + column: component |
| 47 | + description: "The component generating costs" |
| 48 | + - label: "Cost by App Name" |
| 49 | + column: "app_name" |
| 50 | + description: "The app generating costs" |
| 51 | + - label: "Cost by SKU" |
| 52 | + column: "sku_description" |
| 53 | + description: "The sku description for costs" |
| 54 | + - label: "Cost by Data Pipeline" |
| 55 | + column: "pipeline" |
| 56 | + description: "The pipeline incurring costs" |
| 57 | + - label: "Cost by Environment" |
| 58 | + column: "environment" |
| 59 | + description: "The environment incurring costs" |
| 60 | +available_time_zones: |
| 61 | + - America/Los_Angeles |
| 62 | + - America/Chicago |
| 63 | + - America/New_York |
| 64 | + - Europe/London |
| 65 | + - Europe/Paris |
| 66 | + - Asia/Jerusalem |
| 67 | + - Europe/Moscow |
| 68 | + - Asia/Kolkata |
| 69 | + - Asia/Shanghai |
| 70 | + - Asia/Tokyo |
| 71 | + - Australia/Sydney |
0 commit comments