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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
aishak12
Helper IV
Helper IV

IF statement to check if values match

Hi All, 

 

I want to create a new column to check if (RECOMMENDED_BLK = PR_BLK) if values match return a 1, if they do not match return a 0. Does anyone know if this is possible.

 

aishak12_0-1628360482701.png

aishak12_1-1628360576557.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @aishak12 ,

 

You could also use add conditional column feature in Query Editor.

1.PNG

 

Best Regards,

Jay

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @aishak12 ,

 

You could also use add conditional column feature in Query Editor.

1.PNG

 

Best Regards,

Jay

Fowmy
Super User
Super User

@aishak12 

Are these two columns in the same table or different tables? If som in which table do you want to create a new column?


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

They are all the same table. I would like to create a new column in that same table 

@aishak12 

Add a new column as follows:

Match = IF ( TABLE[RECOMMENDED_BLK] = TABLE[PR_BLK] , 1 , 0 )

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi I am receiving error do you know why 

 

aishak12_0-1628374663970.png

 

Hi,

Fowmy's suggestion is to write the calculated column formula in DAX whereas you are writing the formula in the Query Editor.  If you want to write it in the Query Editor, then try this

=if TABLE[RECOMMENDED_BLK] = TABLE[PR_BLK] then 1 else 0


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors