view: yt_custom_id_filter { derived_table: { sql: SELECT DISTINCT custom_id from facts.dev.yt_dashboard_filter_items ;; } measure: count { type: count drill_fields: [detail*] } dimension: custom_id { type: string sql: ${TABLE}.custom_id ;; } dimension: custom_id_on_list { type: string sql: CASE WHEN ${TABLE}.CUSTOM_ID IS NOT NULL THEN 'Y' ELSE 'N' END ;; } set: detail { fields: [custom_id] } }