Forum Discussion
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
- amitchandak
Super User
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") - serpiva64
Solution Sage
Please,
can you share an exemple of teh file?
- ValtteriN
Community 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/ - AnonymousNot 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
Super User
Anonymous , return has one spell mistake, Check that in formula
return
if(_1 ="Not Risk" && _2 = "No Risk", "No Risk", "Risk")