I built a parameter and a measure which run SQL from a joined view, but when I run it in Explore, I get an error: "No such field joined_view.field1"
view: viewA {
.
.
.
parameter: selection_field {
type: unquoted
allowed_value: {
label: "1"
value: "field1"
}
allowed_value: {
label: "2"
value: "field2"
}
allowed_value: {
label: "3"
value: "field3"
}
}
measure: dynamic_count {
type: count_distinct
label: "Selection"
sql:
${joined_view.{% parameter selection_field %}};;
}
}
When I try (below), it runs successfully. How to deal with it? Thanks for your help.
measure: count {
type: count_distinct
sql:
${joined_view.field1};;
}