Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Compare two columns and create new column based the compare the columns

I have two column  one Column confirmation  and another column Timing 

 

Confirmation column have  below three values 

1.Confirmation  

2.Not Confirmed 

3.Pending 

 

 

Confirmation  as consider   No Risk 

Not Confirmed  as Consider  Risk 

Pending  as consider No Risk

 

Timing  column have a following the  values .

 

Overdue Purchase Requisition  consider as   Risk

 

Standard Overdue consider   as Risk

 

Urgent Overdue consider as Risk

 

Urgent  consider as Risk

 

Lack  consider as Risk

 

No Timing Risk Consider as  Risk

 

Now i want to create new calculated column name  called  RISK.  this column would be a logical result of previous two columns.

i have assign two values for the following conditions 

 

    • Risk – used when this delivery is flagged as one of the Risk statuses in either Confirmation column or Timing column
    • No Risk - used when this delivery is flagged as No Risk statuses in both Confirmation column and Timing column

i have created condition its not working . any support . looking for support. 

 

  • Anonymous , Create a new column like

     

    new column =
    Var _1 =
    Switch([Confirmation],
    "Confirmation","No Risk",
    "Not Confirmed","Consider Risk",
    "Pending","No Risk",
    "No Risk")

    Var _2 =
    Switch( true(),
    [Timing] in {"Overdue Purchase Requisition","Standard Overdue","Urgent Overdue","Urgent","Lack","No Timing Risk"}, "Risk",
    "No Risk"
    )
    return
    if(_1 ="Nor Risk" && _2 = "No Risk", "No Risk", "Risk")

5 Replies

  • Anonymous , Create a new column like

     

    new column =
    Var _1 =
    Switch([Confirmation],
    "Confirmation","No Risk",
    "Not Confirmed","Consider Risk",
    "Pending","No Risk",
    "No Risk")

    Var _2 =
    Switch( true(),
    [Timing] in {"Overdue Purchase Requisition","Standard Overdue","Urgent Overdue","Urgent","Lack","No Timing Risk"}, "Risk",
    "No Risk"
    )
    return
    if(_1 ="Nor Risk" && _2 = "No Risk", "No Risk", "Risk")

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

    Hi,

    Try something like this: IF(OR(Table[Confirmation] in {"Confirmation", "Not Confirmed"},Table[Timing] <> "No Timing Risk"),"Risk","No Risk")

    I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

    My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/

  • Anonymous's avatar
    Anonymous
    Not applicable

    amitchandak  sir its showing all the values as Risk and there  No Risk value also there. No Timing Risk is a consider as a No Risk and . if this value match with confirmation column   Pending ,confirmation . its should return No Risk 

    • amitchandak's avatar
      amitchandak
      Icon for Super User rankSuper User

      Anonymous , return has one spell mistake, Check that in formula

      return

      if(_1 ="Not Risk" && _2 = "No Risk", "No Risk", "Risk")