view: orch_app_ar_royalty_statement_period { sql_table_name: ORCHARD_APP_REPORTING_V2.PROD_ROYALTY_ACCOUNTING_ROYALTY_ACCOUNTING.STATEMENT_PERIOD ;; dimension: statement_period_id { type: number label: "Statement Period ID" primary_key: yes sql: ${TABLE}.statement_period_id ;; } dimension: statement_period_status { type: string label: "Statement Period Status" sql: ${TABLE}.statement_period_status ;; } dimension: statement_period_name { type: string label: "Statement Period Name" sql: ${TABLE}.statement_period_name ;; } dimension_group: closed_date { label: "Closed" type: time sql: ${TABLE}.closed_date ;; timeframes: [year, quarter, month, week, date, day_of_year, day_of_week, week_of_year, month_name, month_num, fiscal_month_num, fiscal_quarter, fiscal_quarter_of_year, fiscal_year] } dimension: month { type: number sql: ${TABLE}.statement_month ;; } dimension: year { type: number sql: ${TABLE}.statement_year ;; } dimension_group: statement { type: time sql: DATE_FROM_PARTS(${year}, ${month}, '01') ;; timeframes: [ month, month_num, month_name, quarter, year, fiscal_month_num, fiscal_quarter, fiscal_quarter_of_year, fiscal_year, quarter_of_year ] } }