Forum Discussion
Anonymous
6 years agoNot applicable
New Column Based on different values
Hi dear Community! Seeking your help again. I want to add next column, which case would be for instance: if Column named Branch equals 03 and 04 this should add Spain, and if equals 31, 34, 82,...
- Anonymous6 years ago
Anonymous
Please select branch number column and go to modeling tab and change the data type of Branchnumber from text to numberOR
Use value function
BU = SWITCH(TRUE();VALUE(SOMA[Branch Number]) IN {030;042}; "Spain ";VALUE(SOMA[Branch Number]) IN {031;034; 082;083;085;402}; "France";"UNKNOWN")
OR in case if you want branchnumber field to be text type onlyBU = SWITCH(TRUE();SOMA[Branch Number] IN {"030";"042"}; "Spain ";SOMA[Branch Number] IN {"031";"034"; "082";"083";"085";"402"}; "France";"UNKNOWN")
Anonymous
6 years agoNot applicable
AnonymousVery True!
Corrected but now I am getting different error ( and I have changed format- the Branch Number column is under text format).
Anonymous
6 years agoNot applicable
Anonymous
Please select branch number column and go to modeling tab and change the data type of Branchnumber from text to number
OR
Use value function
BU = SWITCH(TRUE();
VALUE(SOMA[Branch Number]) IN {030;042}; "Spain ";
VALUE(SOMA[Branch Number]) IN {031;034; 082;083;085;402}; "France";
"UNKNOWN")
OR in case if you want branchnumber field to be text type only
OR in case if you want branchnumber field to be text type only
BU = SWITCH(TRUE();
SOMA[Branch Number] IN {"030";"042"}; "Spain ";
SOMA[Branch Number] IN {"031";"034"; "082";"083";"085";"402"}; "France";
"UNKNOWN")
- Anonymous6 years agoNot applicable
BINGO!! 🙂
Thanks a lot. I opted fot the last option.
Coffe from me 🍮