cancel
Showing results for 
Search instead for 
Did you mean: 

How to add multiple expression in SAC in one go?

svenhe
Explorer

Maybe a stupid question but while testing the new data wranling option I ran into the following issue.

I want to change some of the values in one of my columns with the replace function for example:

[column] = replaceContent([room_type], "Entire home/apt", "Volledige woning")

Is it possible to change multiple dimension values in one expression or do I have to change each value with a seperate expression? So can I get something like this is one expression?

[column] = replaceContent([room_type], "Entire home/apt", "Volledige woning") and replaceContent([room_type], "Private Room", "Prive Kamer") and replaceContent([room_type], "Hotel Room", "Hotel Kamer")

Also looked at the if expression but haven't managed yet to do multiple if statements in one expression either.

Thank you for the support.

View Entire Topic
madhumitabanerjee2019
Participant
0 Kudos

Hello S.Heeger

I am afraid if you are trying to use multiple expressions to prepare the data in model, this option will not work for multiple values in one expression .

Thanks

svenhe
Explorer
0 Kudos

Hi Madhumita,

I am trying to change multiple dimension values in 1 expression. Basically a case when statement from a SAP BO universe for example. So in stead of repeating the same expression 3 times to change all the values I want to do this in one expression (so in one transformation).

But guessing from your answer that is propably not possible.

Thanks

Sven