Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

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. 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
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")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
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 

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

return

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
ValtteriN
Super User
Super User

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/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




serpiva64
Solution Sage
Solution Sage

Please, 

can you share an exemple of teh file?

amitchandak
Super User
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")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.