Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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,...
  • Anonymous's avatar
    Anonymous
    6 years ago

    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
    BU = SWITCH(TRUE();
    SOMA[Branch Number] IN {"030";"042"}; "Spain ";
    SOMA[Branch Number] IN {"031";"034"; "082";"083";"085";"402"}; "France";
    "UNKNOWN")