If it’s a dimension you can add drill fields that will carry over as a filter. One easy way to visualize this is geography.
I have my different geography dimensions as drill_fields in a hierarchy. For example:
dimension: country {
label: "Country"
type: string
group_label: " Geography"
sql: ${TABLE}.country ;;
drill_fields: [region, state, city]
}
dimension: region {
label: "Region"
type: string
group_label: " Geography"
sql: case
when ${state} in ('QC', 'ON', 'BC', 'NS', 'MB', 'AB', 'NB', 'PE', 'SK', 'NL', 'YT', 'NT', 'NU') then 'Canada'
when ${state} in ('AK') then 'Alaska'
when ${state} in ('CO', 'ID', 'KS', 'MT', 'NE', 'ND', 'SD', 'UT', 'WY') then 'Frontier'
when ${state} in ('HI') then 'Hawaii'
when ${state} in ('IL', 'IN', 'IA', 'KY', 'MI', 'MN', 'MO', 'OH', 'WI') then 'Midwest'
when ${state} in ('CT', 'DE', 'ME', 'MD', 'MA', 'NH', 'NJ', 'NY', 'PA', 'RI', 'VT', 'VA', 'WV') then 'Northeast'
when ${state} in ('OR','WA') then 'Pacific Northwest'
when ${state} in ('AL', 'AZ', 'AR', 'CA', 'FL', 'GA', 'LA', 'MS', 'NV', 'NM', 'NC', 'OK', 'SC', 'TN', 'TX') then 'Sunbelt'
else 'Other'
end ;;
drill_fields: [state, city]
}
dimension: state {
label: "State"
group_label: " Geography"
map_layer_name: us_states_canada_provinces
type: string
sql: upper(${TABLE}."state") ;;
drill_fields: [city]
}
This way if I have a dashboard showing revenue by country, I can click in and narrow that country by state, etc. You could do that with a drill_fields: [product.category]