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