I have a yesno dimension that I need to read as a string. ex. case when x = “no” then “send” when x = "yes then “keep”
if I create a string dimension with case statement, it will not work in user_details drill down. Do I need to Cast something to make this work?
Hello @jhalfon and welcome!
From what I gather you have two options
dimension: your_yesno_dimension {
type: yesno
sql: ${TABLE}.your_yesno_column ;;
}
dimension: yesno_string {
type: string
sql:
case
when ${your_yesno_dimension} then 'send'
else 'keep'
end
;;
}
dimension: yesno_string {
type: string
sql:
case
when ${TABLE}.your_yesno_column then 'send'
else 'keep'
end
;;
}
this worked, thank you!