Use dimension when creating measure with Case

I am trying to create a measure conditionally based on a dimension.

column is a dimension while geo_area.count_anon and count_anon are measures of sum type.

This measure is not working well.

  measure:measure_count_lvl3 {
type: number
sql:
CASE
WHEN ${column}='GEO_AREA_ID' THEN ${geo_area.count_anon}
ELSE ${count_anon}
END ;;
}

The error:

50b7d502-2493-4034-881a-684f319b7cc2.png

What can I do to solve this?

0 13 1,413
13 REPLIES 13
Top Labels in this Space
Top Solution Authors