Trying to concatenate dimensions and separate them with a space or dash but when I add in the character the new concatenated string does not populate. Simple example -
Dims - cat, dog
function that does work: concat(cat, dog) = tabbypitbull
desired result: concat(cat,” “, dog) = tabby pitbull
-it was posted earlier in the community, but not resolved. Can anyone please help?
concat(field, “ “, field) works fine for me so it may be something else that’s making this not work in your case
Hi,
Thanks for the prompt revert, but i am still facing this error while definning a dim - impression_code
ah, i see. you did it at custom field option in explore, while I am trying to define at view level
Ah I though you were doing this in Table Calculations.
Then I would make sure you get the desired result in your database first, whatever your dialect is.
A couple years late, but for future searchers, I found that CONCAT() wouldn't accept a string as an argument in LookML Dimension SQL
CONCAT(cat,dog) worked
CONCAT(cat,' ',dog) failed
CONCAT(cat," ",dog) failed
I tested an alternate method of concatenation using + and found that cat+dog worked, and then confirmed that cat + ' ' + dog worked