View the original community article here
Last tested: Apr 6, 2020
In some cases, users want to turn their dimension of type string into a measure (to put into a pivot, for example).
To turn a dimension of type string into a measure, we can create a measure of type string and put an aggregation into the sql parameter so that it doesn't throw the GROUP BY/ AGGREGATION error, like so:measure: gender {
type: string
sql: max(${table}.gender);;
}
This content is subject to limited support.