Hi, I’m trying to create a simple parameter to choose between 2 dimensions to breakdown a view. I’ve copied the syntax exactly from the Looker docs, but keep getting an error saying that the “parameter’ needs a field name:
parameter: regiondrilldown {
type: unquoted
allowed_value: {value: "Country"}
allowed_value: {value: "State"}
allowed_value: {value: "City"}
}
dimension: geo_breakdown {
type: string
label_from_parameter: regiondrilldown
sql:
case
when {% parameter ${regiondrilldown} %} = 'Country' Then ${country}
when {% parameter ${regiondrilldown} %} = 'State' then ${state}
when {% parameter ${regiondrilldown} %} = 'City' then ${city}
end ;;
}
Best answer by n_davis
View original