| # emulates https://lookercs-internal.git.corp.google.com/cloud_sales_bi/+/refs/heads/master/views/revenue/revenue_from_revenue.view.lkml |
| view: revenue_from_revenue { |
| extension: required |
| ########## DIMENSIONS ############ |
| dimension: currency_code { |
| view_label: "Revenue" |
| description: "Three letter currency code (e.g. USD) for local billing amount." |
| sql: ${TABLE}.currency_code ;; |
| } |
| dimension: dynamic_usage_timeframe { |
| view_label: "Revenue" |
| description: "Dynamic field that is returns usage date, dependent on `Usage Timeframe Selector`. If none selected, defaults to daily." |
| type: date |
| sql: CASE |
| WHEN {% parameter usage_timeframe_selector %} = 'Date' THEN SAFE_CAST(${usage_date} AS STRING) |
| WHEN {% parameter usage_timeframe_selector %} = 'Week' THEN ${usage_week} |
| WHEN {% parameter usage_timeframe_selector %} = 'Month' THEN CONCAT(${usage_month},"-01") |
| END ;; |
| } |
| dimension: gcp_revenue_source { |
| view_label: "Revenue" |
| label: "GCP Revenue Source" |
| description: "Used by the Northam team to filter revenue. Values can be Organic GCP (all products except for Marketplace Services), MP Standard (Marketplace Services that aren't pre-paid), or MP Prepay (Marketplace Services that are prepaid)." |
| case: { |
| when: { |
| sql: ${product_group} != "Non-Cloud" ;; |
| label: "Organic GCP" |
| } |
| when: { |
| sql: ${product_group} = "Non-Cloud" AND NOT ${is_nonmetered} ;; |
| label: "MP Standard" |
| } |
| when: { |
| sql: ${product_group} = "Non-Cloud" AND ${is_nonmetered} ;; |
| label: "MP Prepaid" |
| } |
| else: "Other Revenue" |
| } |
| } |
| dimension_group: invoice_month_start { |
| type: time |
| timeframes: [raw, date, week, month, quarter, year] |
| view_label: "Revenue" |
| sql: ${TABLE}.invoice_month_start ;; |
| datatype: date |
| convert_tz: no |
| } |
| |
| dimension: is_data_analytics { |
| type: yesno |
| label: "Is Data Analytics?" |
| view_label: "Product" |
| sql: ${revenue.product_group_l2} = 'Analytics' |
| OR ${revenue.is_dataproc} |
| OR ${revenue.logical_product_l3} IN ('AI Platform', 'Confluent', 'Confluent Dev', |
| 'Confluent Staging', 'Databricks', 'Elastic', 'Elastic - Dev', 'Fivetran', |
| 'Informatica', 'MongoDB Inc.', 'Palantir') ;; |
| description: "Returns yes if this is Data & Analytics (DA) usage" |
| } |
| dimension: is_dataproc { |
| type: yesno |
| label: "Is Dataproc Node?" |
| view_label: "Product" |
| sql: ${TABLE}.is_dataproc_node ;; |
| description: "Does this usage come from a Dataproc node?" |
| } |
| dimension: is_gcp_marketplace { |
| type: yesno |
| label: "Is GCP Marketplace?" |
| view_label: "Product" |
| sql: ${TABLE}.is_gcp_marketplace ;; |
| } |
| dimension: is_gke_node { |
| type: yesno |
| label: "Is GKE Node?" |
| view_label: "Product" |
| sql: ${TABLE}.is_gke_node ;; |
| description: "Does this usage come from a GKE node?" |
| } |
| dimension: product_family_l1 { |
| label: "Product Family (L1)" |
| group_label: "Finance Product Hierarchy" |
| view_label: "Product" |
| description: "Examples: Google Workspace, GCP, Maps, PSO" |
| sql: ${TABLE}.product_group ;; |
| drill_fields: [product_group_l2] |
| } |
| dimension: product_group_l2 { |
| label: "Product Group (L2)" |
| group_label: "Finance Product Hierarchy" |
| view_label: "Product" |
| description: "Examples: Marketplace Services, Compute, Support, Databases, etc." |
| sql: ${TABLE}.product_group_l2 ;; |
| drill_fields: [logical_product_l3] |
| } |
| dimension: logical_product_l3 { |
| label: "Logical Product (L3)" |
| group_label: "Finance Product Hierarchy" |
| view_label: "Product" |
| description: "Examples: Persistent Disk, VM Image Storage, GCE" |
| sql: ${TABLE}.logical_product_l3 ;; |
| } |
| # dimension: machine_type { |
| # view_label: "Product" |
| # description: "Machine Type Classifications for Compute Engine" |
| # sql: IF(${product_line_raw} = "Compute Engine", CASE |
| # WHEN ${is_gke_node} THEN "GKE" |
| # WHEN ${is_dataproc} THEN "Dataproc" |
| # WHEN ${sku_description} LIKE '%A2 %' THEN 'A2' |
| # WHEN ${sku_description} LIKE '%E2 %' THEN 'E2' |
| # WHEN ${sku_description} LIKE '%Memory%optimized%' THEN 'M1/M2' |
| # WHEN ${sku_description} LIKE '%N2 %' THEN 'N2' |
| # WHEN ${sku_description} LIKE '%N2D%' THEN 'N2D' |
| # WHEN ${sku_description} LIKE '%Compute%optimized%' THEN 'C2' |
| # WHEN LOWER(${sku_description}) LIKE '%custom%ram%' OR ${sku_description} LIKE '%Custom%Core%' OR ${sku_description} LIKE '%N1 %' OR ${sku_description} LIKE '%v1: Cpu%' OR ${sku_description} LIKE '%v1: Ram%' OR ${sku_description} LIKE '%Instance Ram hosted on Sole Tenancy%' OR ${sku_description} LIKE '%Sole Tenancy Instance RAM%' OR ${sku_description} LIKE '%Sole Tenancy Instance Ram%' OR ${sku_description} LIKE '%Instance Core hosted on Sole Tenancy%' OR ${sku_description} LIKE '%Sole Tenancy Instance Core%' OR ${sku_description} LIKE 'Micro Instance%' OR ${sku_description} LIKE 'Preemptible Micro Instance%' OR ${sku_description} LIKE '%Small Instance%' THEN "N1" |
| # ELSE "Other Machine Type" |
| # END, NULL) ;; |
| # drill_fields: [sku_description] |
| # } |
| dimension: product_group { |
| group_label: "Legacy Product Hierarchy" |
| view_label: "Product" |
| description: "Groupings of Product Line into broader categories like \"Compute\" or \"Data Analytics\"" |
| sql: ${TABLE}.product_group ;; |
| drill_fields: [product_line] |
| } |
| dimension: product_line { |
| group_label: "Legacy Product Hierarchy" |
| view_label: "Product" |
| description: "Product Line, but with is_gke_node = True reassigned to Kubernetes Engine and is_dataproc = True reassigned to Dataproc" |
| sql: IF(${product_line_raw} = "Compute Engine", |
| CASE |
| WHEN ${is_gke_node} THEN "Kubernetes Engine" |
| WHEN ${is_dataproc} THEN "Dataproc" |
| ELSE "Compute Engine" |
| END, |
| ${product_line_raw});; |
| drill_fields: [sku_description, ] |
| } |
| |
| dimension: product_line_raw { |
| hidden: yes |
| group_label: "Legacy Product Hierarchy" |
| view_label: "Product" |
| sql: ${TABLE}.product_line;; |
| #drill_fields: [sku_description] |
| } |
| |
| # dimension: product_line_raw { |
| # hidden: yes |
| # group_label: "Legacy Product Hierarchy" |
| # view_label: "Product" |
| # sql: {% if project_number._in_query %} ${TABLE}.product_name |
| # {% elsif project_name._in_query %} ${TABLE}.product_name |
| # {% elsif project_id._in_query %} ${TABLE}.product_name |
| # {% elsif sku_id._in_query %} ${TABLE}.product_name |
| # {% elsif sku_description._in_query %} ${TABLE}.product_name |
| # {% elsif machine_type._in_query %} ${TABLE}.product_name |
| # {% elsif resource_group._in_query %} ${TABLE}.product_name |
| # {% elsif storage_locality._in_query %} ${TABLE}.product_name |
| # {% elsif storage_class._in_query %} ${TABLE}.product_name |
| # {% elsif usage_location._in_query %} ${TABLE}.product_name |
| # {% elsif usage_unit._in_query %} ${TABLE}.product_name |
| # {% elsif usage_in_usage_units._in_query %} ${TABLE}.product_name |
| # {% else %} ${TABLE}.product_line {% endif %} ;; |
| # drill_fields: [sku_description] |
| # } |
| # dimension: product_specialization { |
| # view_label: "Product" |
| # sql: {% if project_number._in_query %} ${TABLE}.specialization |
| # {% elsif project_name._in_query %} ${TABLE}.specialization |
| # {% elsif project_id._in_query %} ${TABLE}.specialization |
| # {% elsif sku_id._in_query %} ${TABLE}.specialization |
| # {% elsif sku_description._in_query %} ${TABLE}.specialization |
| # {% elsif machine_type._in_query %} ${TABLE}.specialization |
| # {% elsif resource_group._in_query %} ${TABLE}.specialization |
| # {% elsif storage_locality._in_query %} ${TABLE}.specialization |
| # {% elsif storage_class._in_query %} ${TABLE}.specialization |
| # {% elsif usage_location._in_query %} ${TABLE}.specialization |
| # {% elsif usage_unit._in_query %} ${TABLE}.specialization |
| # {% elsif usage_in_usage_units._in_query %} ${TABLE}.specialization |
| # {% else %} ${TABLE}.product_specialization {% endif %} ;; |
| # drill_fields: [sku_description] |
| # } |
| dimension: service_family { |
| view_label: "Product" |
| description: "Service family, i.e. CLOUD or GEO" |
| type: string |
| sql: ${TABLE}.service_family ;; |
| } |
| # dimension: storage_class { |
| # view_label: "Product" |
| # group_label: "Cloud Storage" |
| # description: "Groups Cloud Storage into Archive, Coldline, Nearline, and Standard based on sku description." |
| # case: { |
| # when: { |
| # sql: ${product_line_raw} = "Cloud Storage" AND ${sku_description} LIKE '%Archive%' ;; |
| # label: "Archive" |
| # } |
| # when: { |
| # sql: ${product_line_raw} = "Cloud Storage" AND ${sku_description} LIKE '%Coldline%' ;; |
| # label: "Coldline" |
| # } |
| # when: { |
| # sql: ${product_line_raw} = "Cloud Storage" AND ${sku_description} LIKE '%Nearline%' ;; |
| # label: "Nearline" |
| # } |
| # when: { |
| # sql: ${product_line_raw} = "Cloud Storage" ;; |
| # label: "Standard" |
| # } |
| # } |
| # } |
| # dimension: storage_locality { |
| # view_label: "Product" |
| # group_label: "Cloud Storage" |
| # description: "Groups Cloud Storage into Multi-Region, Dual-Region, or Regional based on sku description." |
| # case: { |
| # when: { |
| # sql: ${product_line_raw} = "Cloud Storage" AND ${sku_description} LIKE '%Multi%' ;; |
| # label: "Multi-Region" |
| # } |
| # when: { |
| # sql: ${product_line_raw} = "Cloud Storage" AND ${sku_description} LIKE '%Dual%' ;; |
| # label: "Dual-Region" |
| # } |
| # when: { |
| # sql: ${product_line_raw} = "Cloud Storage" ;; |
| # label: "Regional" |
| # } |
| # } |
| # } |
| dimension_group: usage { |
| type: time |
| timeframes: [raw, day_of_month, day_of_year, day_of_week, date, week, month, month_name, quarter, quarter_of_year, year] |
| view_label: "Revenue" |
| description: "Date on which usage was recorded" |
| sql: ${TABLE}.partition_date ;; |
| datatype: date |
| convert_tz: no |
| } |
| dimension: usd_revenue_blended { |
| hidden: yes |
| view_label: "Revenue" |
| sql: {% if filter_nonmetered._parameter_value == "true" %} |
| IF(NOT ${is_nonmetered}, ${TABLE}.usd_revenue_blended, 0) |
| {% else %} |
| ${TABLE}.usd_revenue_blended |
| {% endif %} |
| ;; |
| } |
| dimension: usd_revenue_bmod { |
| hidden: yes |
| view_label: "Revenue" |
| sql: ${TABLE}.usd_revenue_bmod ;; |
| } |
| dimension: usd_revenue_cross_pa_credits { |
| hidden: yes |
| description: "Added to usd_revenue_net_cn to create GCP Actuals" |
| sql: ${TABLE}.usd_revenue_cross_pa_credits ;; |
| } |
| dimension: usd_revenue_cud { |
| hidden: yes |
| view_label: "Revenue" |
| description: "Committed Usage Discount credits applied against the _gross amount, reported in USD($) using a monthly Ceilometer exchange rate." |
| sql: ${TABLE}.usd_revenue_cud ;; |
| } |
| dimension: usd_revenue_ft { |
| hidden: yes |
| view_label: "Revenue" |
| description: "Free Trial credit applied against the _gross amount, reported in USD($) using a monthly Ceilometer exchange rate." |
| sql: ${TABLE}.usd_revenue_ft ;; |
| } |
| dimension: usd_revenue_gross { |
| hidden: yes |
| view_label: "Revenue" |
| description: "Monetised value for resource consumption, before application of any credits, reported in USD($) using a monthly Ceilometer exchange rate. (Generally a positive number)" |
| sql: ${TABLE}.usd_revenue_gross ;; |
| } |
| dimension: usd_revenue_gross_cn { |
| hidden: yes |
| view_label: "Revenue" |
| sql: ${TABLE}.usd_revenue_gross_cn ;; |
| } |
| dimension: usd_revenue_list { |
| hidden: yes |
| view_label: "Revenue" |
| sql: ${TABLE}.usd_revenue_list ;; |
| } |
| dimension: usd_revenue_net { |
| hidden: yes |
| view_label: "Revenue" |
| description: "Final billed amounts after application of all other credits, reported in USD($) using an annual exchange rate. (Net amounts are normally positive or round to zero, but it some cases credits can exceed gross and net will be negative)" |
| sql: ${TABLE}.usd_revenue_net ;; |
| } |
| dimension: usd_revenue_ntg { |
| hidden: yes |
| view_label: "Revenue" |
| description: "Net to Google Revenue" |
| sql: ${TABLE}.usd_revenue_ntg ;; |
| } |
| dimension: usd_revenue_net_cn { |
| hidden: yes |
| view_label: "Revenue" |
| sql: {% if filter_nonmetered._parameter_value == "true" %} |
| IF(NOT ${is_nonmetered}, ${TABLE}.usd_revenue_net_cn, 0) |
| {% else %} |
| ${TABLE}.usd_revenue_net_cn |
| {% endif %} |
| ;; |
| } |
| dimension: usd_revenue_promo { |
| hidden: yes |
| view_label: "Revenue" |
| description: "Other promotional credits applied against the _gross amount, reported in USD($) using a monthly Ceilometer exchange rate." |
| sql: ${TABLE}.usd_revenue_promo ;; |
| } |
| dimension: usd_revenue_protected_credit { |
| hidden: yes |
| view_label: "Revenue" |
| sql: ${TABLE}.usd_revenue_protected_credit ;; |
| } |
| dimension: usd_revenue_reseller { |
| hidden: yes |
| view_label: "Revenue" |
| sql: ${TABLE}.usd_revenue_reseller ;; |
| } |
| dimension: usd_revenue_rvp { |
| hidden: yes |
| view_label: "Revenue" |
| description: "Revenue for RVPs: see go/revenue-walk for details" |
| sql: ${TABLE}.usd_revenue_rvp ;; |
| } |
| dimension: usd_revenue_sud { |
| hidden: yes |
| view_label: "Revenue" |
| description: " Usage Discount credits applied against the _gross amount, reported in USD($) using a monthly Ceilometer exchange rate." |
| sql: ${TABLE}.usd_revenue_sud ;; |
| } |
| dimension: is_nonmetered { |
| type: yesno |
| label: "Is Nonmetered?" |
| view_label: "Product" |
| sql: ${TABLE}.is_nonmetered ;; |
| } |
| #### MEASURES #### |
| measure: revenue_invoice { |
| alias: [revenue_actuals] |
| label: "Revenue (Invoice)" |
| view_label: "Revenue" |
| description: "Sum of Revenue (Sales) minus hug credits. Post alignment we have agreed to keep only one source of truth for revenue and it will be gcc.revenue. Gcp_consumpiton will be deprecated but another table(with adjustments) will be established to enable the bridge from gcc.revenue to finance." |
| type: sum |
| sql: ${usd_revenue_net} - ${usd_revenue_cross_pa_credits};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_actuals, revenue_net_cn] |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_line\" }}&limit=10" |
| label: "Top 10 Product Lines" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.nal_name,revenue.reporting_account_name\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Top 10 Accounts" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.segment\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Segment" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.account_category\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Account Category" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Region" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region,revenue.sub_region,revenue.micro_region,revenue.nal_cluster,revenue.nal_name,revenue.nal_id\" }}&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by NAL" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_group\" }}" |
| label: "Drill by Product Group" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_bmod { |
| group_label: "Discounts, Credits & BMODS" |
| label: "Revenue (Billing Modifications)" |
| view_label: "Revenue" |
| description: "The subset of revenue that is due to a billing modification. Billing Modifications (BMods) are requested when an adjustment affecting the regular invoicing process needs to be made." |
| type: sum |
| sql: ${usd_revenue_bmod};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, usd_revenue_bmod, revenue_gross, revenue_net_cn] |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_cross_pa_credits { |
| group_label: "Discounts, Credits & BMODS" |
| label: "Revenue (xPA Credits)" |
| view_label: "Revenue" |
| description: "Cross PA Credits." |
| type: sum |
| sql: ${usd_revenue_cross_pa_credits};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_cross_pa_credits, revenue_gross, revenue_net_cn] |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_cud { |
| group_label: "Discounts, Credits & BMODS" |
| label: "Revenue (Committed Usage Discount)" |
| view_label: "Revenue" |
| description: "Committed Usage Discount credits applied against the Gross amount." |
| type: sum |
| sql: ${usd_revenue_cud};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_cud, revenue_gross, revenue_net_cn] |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_discounts_other { |
| group_label: "Discounts, Credits & BMODS" |
| label: "Revenue (Other Discounts)" |
| view_label: "Revenue" |
| description: "Differences between Gross and Revenue (Sales) not due to BMods, CUD, SUD, Free Trial, or Promo, Cross PA Credits." |
| type: sum |
| sql: -1 * (${usd_revenue_gross} - ${usd_revenue_blended} + ${usd_revenue_cud} + ${usd_revenue_ft} + ${usd_revenue_promo} + ${usd_revenue_sud} +${usd_revenue_reseller}) ;; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id |
| , revenue_discounts_other |
| , revenue_gross |
| , revenue_net_cn |
| ] |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_ft { |
| group_label: "Discounts, Credits & BMODS" |
| label: "Revenue (Free Trial)" |
| view_label: "Revenue" |
| description: "Free Trial credit applied against the Gross amount." |
| type: sum |
| sql: ${usd_revenue_ft};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_ft, revenue_gross, revenue_net_cn] |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_gross { |
| label: "Revenue (Gross)" |
| view_label: "Revenue" |
| description: "Monetised values for resource consumption, before application of credits (adjustments). Gross values are generally positive." |
| type: sum |
| sql: ${usd_revenue_gross};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_gross, revenue_net_cn] |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_line\" }}&limit=10" |
| label: "Top 10 Product Lines" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.nal_name,revenue.reporting_account_name\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Top 10 Accounts" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.segment\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Segment" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.account_category\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Account Category" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Region" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region,revenue.sub_region,revenue.micro_region,revenue.nal_cluster,revenue.nal_name,revenue.nal_id\" }}&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by NAL" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_group\" }}" |
| label: "Drill by Product Group" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| } |
| measure: revenue_list { |
| label: "[go/listrev] Revenue (List)" |
| view_label: "Revenue" |
| description: "Learn more at go/listrev. Amount of monetized usage calculared based on the list price of each SKU (with no discounts applied)." |
| type: sum |
| sql: ${usd_revenue_list} ;; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_list, revenue_gross, revenue_net_cn] |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| link: { |
| url: "http://go/listrev" |
| label: "Learn more about List Revenue Metric" |
| } |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_line\" }}&limit=10" |
| label: "Top 10 Product Lines" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.nal_name,revenue.reporting_account_name\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Top 10 Accounts" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.segment\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Segment" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.account_category\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Account Category" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Region" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region,revenue.sub_region,revenue.micro_region,revenue.nal_cluster,revenue.nal_name,revenue.nal_id\" }}&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by NAL" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_group\" }}" |
| label: "Drill by Product Group" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| } |
| measure: revenue_net_cn { |
| label: "Revenue (Sales)" |
| view_label: "Revenue" |
| description: "Channel-neutral revenue (usd_revenue_net_cn) for accounts which are SMB, Corp, or GPS. Net-to-google revenue for commercial Select/Enterprise accounts." |
| type: sum |
| sql: ${usd_revenue_blended};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_net_cn] |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_line\" }}&limit=10" |
| label: "Top 10 Product Lines" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.nal_name,revenue.reporting_account_name\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Top 10 Accounts" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.product_group,revenue.sku_id,revenue.sku_description\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Top 10 SKUs" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.segment\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Segment" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.account_category\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Account Category" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Region" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region,revenue.sub_region,revenue.micro_region,revenue.nal_cluster,revenue.nal_name,revenue.nal_id\" }}&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by NAL" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_group\" }}" |
| label: "Drill by Product Group" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_promo { |
| group_label: "Discounts, Credits & BMODS" |
| label: "Revenue (Promo)" |
| view_label: "Revenue" |
| description: "Other promotional credits applied against the Gross amount" |
| type: sum |
| sql: ${usd_revenue_promo};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_promo, revenue_gross, revenue_net_cn] |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_reseller { |
| group_label: "Discounts, Credits & BMODS" |
| label: "Revenue (Reseller)" |
| view_label: "Revenue" |
| description: "Reseller Discount credits applied against the Gross amount." |
| type: sum |
| sql: ${usd_revenue_reseller};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_reseller, revenue_gross, revenue_net_cn] |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_rvp { |
| label: "Revenue (RVP)" |
| view_label: "Revenue" |
| description: "Revenue definition used by Region VPs. See go/revenue-walk" |
| type: sum |
| sql: ${usd_revenue_rvp};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_net_cn] |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_line\" }}&limit=10" |
| label: "Top 10 Product Lines" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.nal_name,revenue.reporting_account_name\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Top 10 Accounts" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.product_group,revenue.sku_id,revenue.sku_description\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Top 10 SKUs" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.segment\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Segment" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.account_category\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Account Category" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Region" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region,revenue.sub_region,revenue.micro_region,revenue.nal_cluster,revenue.nal_name,revenue.nal_id\" }}&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by NAL" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_group\" }}" |
| label: "Drill by Product Group" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_sud { |
| group_label: "Discounts, Credits & BMODS" |
| label: "Revenue (Sustained Usage Discount)" |
| view_label: "Revenue" |
| description: "Sustained Usage Discount credits applied against the Gross amount." |
| type: sum |
| sql: ${usd_revenue_sud};; |
| value_format_name: usd_0 |
| drill_fields: [billing_account_id, revenue_sud, revenue_gross, revenue_net_cn] |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| measure: revenue_toggle { |
| group_label: "Other Revenue" |
| label: "Revenue (Toggle-able)" |
| label_from_parameter: metric_selector |
| view_label: "Revenue" |
| description: "This parameter is for dashboard building only! This allows users to select a metric type |
| from a dashboard filter. For example, the dashboard might default to using Gross Revenue, but the user |
| can use this parameter to change to using 2021 Def. Sales Revenue instead. Must be used with the |
| Metric Selector parameter to select what this metric will display" |
| type: sum |
| sql: {% if metric_selector._parameter_value == 'invoice' %} ${usd_revenue_net} |
| {% elsif metric_selector._parameter_value == 'ntg' %} ${usd_revenue_ntg} |
| {% elsif metric_selector._parameter_value == 'net_channel_neutral' %} ${usd_revenue_net_cn} |
| {% elsif metric_selector._parameter_value == 'gross' %} ${usd_revenue_gross} |
| {% elsif metric_selector._parameter_value == 'blended' %} ${usd_revenue_blended} |
| {% elsif metric_selector._parameter_value == 'rvp' %} ${usd_revenue_rvp} |
| {% endif %} ;; |
| drill_fields: [billing_account_id, revenue_toggle] |
| value_format_name: usd_0 |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_line\" }}&limit=10" |
| label: "Top 10 Product Lines" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.nal_name,revenue.reporting_account_name\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Top 10 Accounts" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.segment\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Segment" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.account_category\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Account Category" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region\" }}&limit=10&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by Region" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: " |
| {% assign column_name = \"=\" | append: _view._name | append: \".billing_account_id\" %} |
| {{ link | replace: column_name, \"=revenue.region,revenue.sub_region,revenue.micro_region,revenue.nal_cluster,revenue.nal_name,revenue.nal_id\" }}&sorts={{ _field._name }}+desc |
| " |
| label: "Drill by NAL" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| link: { |
| url: "{{ link | replace: \"billing_account_id\", \"product_group\" }}" |
| label: "Drill by Product Group" |
| icon_url: "https://g3doc.corp.google.com/company/teams/concord/portal/images/logo-concord-no-text.png" |
| } |
| # Reference: https://community.looker.com/lookml-5/conditional-formatting-using-value-format-926 |
| # html: @{custom_dollar_formatting} ;; |
| } |
| #### PARAMETERS #### |
| parameter: metric_selector { |
| view_label: "Revenue" |
| description: "This parameter is for dashboard building only. This allows users to select a metric type |
| from a dashboard filter. For example, the dashboard might default to using Gross Revenue, but the user |
| can use this parameter to change to using 2021 Def. Sales Revenue instead. Must be used with the |
| Toggleable Revenue Metric, and not the normal metrics." |
| default_value: "blended" |
| type: unquoted |
| allowed_value: { |
| label: "Revenue (Sales)" |
| value: "blended" |
| } |
| allowed_value: { |
| label: "Revenue (RVP)" |
| value: "rvp" |
| } |
| allowed_value: { |
| label: "Revenue (2021 Def.)" |
| value: "net_channel_neutral" |
| } |
| allowed_value: { |
| label: "Revenue (Invoice)" |
| value: "invoice" |
| } |
| allowed_value: { |
| label: "Revenue (Gross)" |
| value: "gross" |
| } |
| allowed_value: { |
| label: "Revenue (Net-to-Google)" |
| value: "ntg" |
| } |
| } |
| parameter: filter_nonmetered { |
| view_label: "Revenue" |
| label: "Remove Prepaid Purchases?" |
| description: "Filters out Marketplace Prepaid Purchases, which can erroneously inflate forecasts. Default is to filter these out." |
| default_value: "false" |
| type: unquoted |
| allowed_value: { |
| label: "Remove" |
| value: "true" |
| } |
| allowed_value: { |
| label: "Include" |
| value: "false" |
| } |
| } |
| parameter: usage_timeframe_selector { |
| view_label: "Revenue" |
| description: "Updates the `Dynamic Usage Timeframe` field based on selection of granularity." |
| type: string |
| default_value: "Date" |
| allowed_value: { |
| value: "Date" |
| } |
| allowed_value: { |
| value: "Week" |
| } |
| allowed_value: { |
| value: "Month" |
| } |
| } |
| } |