view: prs_prod_ppl_sales { sql_table_name: performance_rights_sales.prod.ppl_sales_stmt ;; #File dimension: file_name { type: string sql: ${TABLE}.filename ;; view_label: "File" } dimension: file_size { type: string sql: ${TABLE}.filesize ;; view_label: "File" } #Date dimension: allocation_period { type: string sql: ${TABLE}.allocation_period ;; view_label: "Date" } dimension: period_start_date { type: date sql: ${TABLE}.start_date ;; view_label: "Date" } dimension: period_end_date { type: date sql: ${TABLE}.end_date ;; view_label: "Date" } #Member dimension: ppl_member_id { type: string sql: ${TABLE}.ppl_member_id ;; view_label: "Member" label: "PPL Member ID" } dimension: member_name { type: string sql: ${TABLE}.member_name ;; view_label: "Member" label: "PPL Member Name" } #Artist dimension: artist_name { type: string sql: ${TABLE}.band_artist_name ;; view_label: "Artist" } #Track dimension: ppl_recording_id { type: string sql: ${TABLE}.ppl_recording_id ;; view_label: "Track" label: "PPL Recording ID" } dimension: recording_isrc { type: string sql: ${TABLE}.recording_isrc ;; view_label: "Track" label: "ISRC" } dimension: track_name { type: string sql: ${TABLE}.recording_title ;; view_label: "Track" } dimension: recording_p_date { type: string sql: ${TABLE}.recording_p_date ;; view_label: "Track" label: "Publishing Year" } dimension: content_type { type: string sql: ${TABLE}.recording_content_type ;; view_label: "Track" } dimension: country_of_recording { type: string sql: ${TABLE}.country_of_recording ;; view_label: "Track" } #Statement Detail dimension: payment_component { type: string sql: ${TABLE}.payment_component ;; } dimension: revenue_type { type: string sql: ${TABLE}.revenue_type ;; } dimension: rightsholding_percentage { type: string sql: ${TABLE}.rightsholding_percentage ;; label: "Percent Claimed" value_format: "#,##0.00" } #Measures measure: recording_allocation_amount_gbp { type: sum sql: TO_NUMERIC(REGEXP_REPLACE(${TABLE}.recording_allocation_amount_gbp, '[^0-9]+', '')) / 100 ;; label: "Recording Allocation (GPB)" value_format: "#,##0.00" } measure: non_qualifying_performer_allocation_amount_gbp { type: sum sql: TO_NUMERIC(REGEXP_REPLACE(${TABLE}.non_qualifying_performer_allocation_amount_gbp, '[^0-9]+', '')) / 100 ;; label: "NQ Performer Allocation (GPB)" description: "NQ = Non-Qualifying" value_format: "#,##0.00" } measure: total_allocation_amount_gbp { type: sum sql: TO_NUMERIC(REGEXP_REPLACE(${TABLE}.total_allocation_amount_gbp, '[^0-9]+', '')) / 100 ;; label: "Total Allocation (GPB)" value_format: "#,##0.00" } }