Forum Discussion

bjha's avatar
bjha
New Member
4 years ago
Solved

Custom column with non mutual exclusive categories

i am trying to create a custom column that can create non -mutually exclusive categories

 

if [category]=A then A , if [category]=B then B , if [category]=c then c, if[category] = A or B, combo1, if [category]=B or C , combo2

 

is there any way to achieve this. i have tried with If and switch but not getting the desired result

  • Anonymous's avatar
    Anonymous
    4 years ago

    HI bjha,

    You can create the conditions with these conditions, but the first condition should have a higher priority to check all matched items than the others.

     

    formula =
    IF (
        Table[category] IN { "A", "B" },
        //both A, B will trigger this conditions
        "combo1",
        IF ( Table[category] IN { "B", "C" }, 
            //Only C trigger this, it has a hidden conditions that the records does not match with previous conditions.
            "combo2" )
    )
    

     

    Regards,

    Xiaoxin Sheng

2 Replies

  • you need to change the order of your tests. As you have it the condition "A or B" will never trigger because both A and B are tested individually before that.

     

    Rethink the order, and implement accordingly. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI bjha,

    You can create the conditions with these conditions, but the first condition should have a higher priority to check all matched items than the others.

     

    formula =
    IF (
        Table[category] IN { "A", "B" },
        //both A, B will trigger this conditions
        "combo1",
        IF ( Table[category] IN { "B", "C" }, 
            //Only C trigger this, it has a hidden conditions that the records does not match with previous conditions.
            "combo2" )
    )
    

     

    Regards,

    Xiaoxin Sheng