Forum Discussion

jcollier's avatar
jcollier
Frequent Visitor
8 years ago
Solved

New column based on other's text

I have a table with two columns: employees and their status.

 

What I'd like to do:

I'd like to classify the status into two categories: active and inactive.

I know I should create new table only with status and its assigned category, then make a relationship.

 

Questions:

1. How can I automatically classify status starting with number as 'inactive' category?

2. How can I automatically classify status with text 'idle' as 'inactive' category?

 

Original table:

 

employeestatus
Johnidle
William 7861
Annatraining
Francescleaning
Jason#foo

 

Calculated table:

 

statuscategory
idleinactive
7861inactive
trainingactive
cleaningactive
#fooinactive

 

  • See response in other thread, catches everything except #foo, not sure of that one but if you can supply the rule, you can add it to the IF statement:

     

    Column = IF(NOT(ISERROR(VALUE(LEFT([status],1)))) || [status] = "idle", "inactive", "active")

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    See response in other thread, catches everything except #foo, not sure of that one but if you can supply the rule, you can add it to the IF statement:

     

    Column = IF(NOT(ISERROR(VALUE(LEFT([status],1)))) || [status] = "idle", "inactive", "active")