view: int_dbt_prod_approved_products_revenue { sql_table_name:"INTELLIGENCE"."DBT_PROD"."APPROVED_PRODUCTS_REVENUE";; dimension: label_id { type: number label: "Label ID" view_label: "Label" description: "Label ID" sql: ${TABLE}.label_id ;; } dimension: subaccount_name { label: "SubAccount Name" view_label: "SubAccount" description: "Name of the subaccount" type: string sql: ${TABLE}.subaccount_name ;; } dimension: upc { label: "UPC" view_label: "Release" primary_key: yes description: "Universal Product Code: Unique identifier for each release" type: string sql: ${TABLE}.upc ;; } dimension: release_name { type: string label: "Release Name" view_label: "Release" description: "Name of the release" sql: ${TABLE}.release_name ;; } dimension: imprint_name { description: "Denotes if there are any vanity 'labels/accounts' within an account structure" type: string label: "Imprint Name" view_label: "Release" sql: ${TABLE}.imprint_name ;; } dimension: brand_name { type: string full_suggestions: no label: "Brand Name" view_label: "Orchard/AWAL Tiers" sql: ${TABLE}.brand_name ;; description: "Name of the company to which the label belongs. Can be awal, orchard, sme" } dimension: service_tier_name { type: string full_suggestions: no label: "Service Tier Name" view_label: "Orchard/AWAL Tiers" sql: ${TABLE}.service_tier_name ;; description: "Client tier the label falls into as per the awal tiers. (Values are null for Orchard brands)" } dimension_group: sale_start_date { type: time description: "The date when The Orchard started distributing a track" view_label: "Date" label: "Sales Start" timeframes: [date, week, month, year, week_of_year, month_name, month_num, fiscal_month_num, fiscal_quarter, fiscal_quarter_of_year, fiscal_year] sql: ${TABLE}.sale_start_date ;; convert_tz: no } dimension: label_name { description: "Name of the label" type: string label: "Label Name" view_label: "Label" sql: ${TABLE}.label_name ;; } dimension: label_manager { description: "Name of the Label Manager" type: string label: "Label Manager" view_label: "Label" sql: ${TABLE}.label_manager ;; } dimension_group: approval_date { type: time label: "Approval" view_label: "Date" sql: ${TABLE}.approval_date ;; timeframes: [year, quarter, month, date, time] } measure: gross_revenue_usd { label: "Lifetime Revenue (Products approved)" view_label: "Accounting" type: sum sql: ${TABLE}.gross_revenue_usd ;; value_format:"$#,##0.00" } measure: units { label: "Units" view_label: "Accounting" type: sum sql: ${TABLE}.units ;; } dimension: label_ltm_gross_revenue_usd { label: "Label Last 12 months Gross Revenue" view_label: "Accounting" type: number sql: ${TABLE}.label_ltm_gross_revenue_usd ;; value_format:"$#,##0.00" } measure: number_of_releases { type: count_distinct label: "Number of Releases" view_label: "Release" description: "Count of distinct UPCs" sql:${TABLE}.upc;; } }