# B or A or C
dimension: foo {
type: string
sql: ${TABLE}.foo ;;
hidden: yes
}
dimension: foo_for_sort {
type: string
sql: CASE ${foo}
WHEN 'B' THEN '1 B'
WHEN 'A' THEN '2 A'
WHEN 'C' THEN '3 C'
END ;;
label: "Foo"
html: {{ value | remove_first: "1 " | remove_first: "2 " | remove_first: "3 " }} ;;
}
Hi! Thank you all for your response. I tried it all but it still didn’t worked. I used the spaces before the dimension name, works fine now, I’ll use it for the mean time.