Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Gender

Hello ! I need help categorizing different numbers that tell what gender it is. Ex: 0, woman 1, man 2, woman 3, man etc Is there any good way to create a new variable for it?  
  • DimaMD's avatar
    3 years ago

    Hi Anonymous  try it

    SWITCH(
        TRUE(),
        OR([#] = 0, [#] = 2), "woman",
        OR([#] = 1, [#] = 3), "man",
        "etc"
    )   

  • DimaMD's avatar
    DimaMD
    3 years ago

    Anonymous See also this file, I optimized the measure and gave 2 examples