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! Request now

Reply
Diogo_Ferreira
New Member

Excel Formula IF into BI

Hi,  

How to perform the below excel formula in Power BI in a new column?
New Column
=IF(A1="";"";IF(A1<>A2;"Yes;"No"))

 

Info:

A1 = ID_task line 1

A2 = ID_task line 2

 

Tks.

2 ACCEPTED SOLUTIONS
Mahesh0016
Super User
Super User

column=IF(A1="","",IF(A1<>A2,"Yes,"No"))

column=IF(A1=blank(),"",IF(A1<>A2,"Yes,"No"))

 

>>If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Hi  @Diogo_Ferreira ,

I created some data:

vyangliumsft_0-1672040419883.png

Here are the steps you can follow:

1. Create calculated column.

Column =
IF(
    'Table'[ID_task line 1]=BLANK(),
    BLANK(),
   IF(
        'Table'[ID_task line 1]<> 'Table'[ID_task line 2],"Yes","No"))

2. Result:

vyangliumsft_1-1672040419884.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @Diogo_Ferreira ,

I created some data:

vyangliumsft_0-1672040419883.png

Here are the steps you can follow:

1. Create calculated column.

Column =
IF(
    'Table'[ID_task line 1]=BLANK(),
    BLANK(),
   IF(
        'Table'[ID_task line 1]<> 'Table'[ID_task line 2],"Yes","No"))

2. Result:

vyangliumsft_1-1672040419884.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Mahesh0016
Super User
Super User

column=IF(A1="","",IF(A1<>A2,"Yes,"No"))

column=IF(A1=blank(),"",IF(A1<>A2,"Yes,"No"))

 

>>If this post helps, please consider accept as solution to help other members find it more quickly.

FreemanZ
Super User
Super User

Hi @Diogo_Ferreira 

 

It would be easier, if you could provide some sample data and expected result column, full representing your case. 

e.g. the description only explained the formula for B1, what about B2? Always compare the next row?

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.