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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Fab117
Helper IV
Helper IV

Custom Column with If condition

Hi,

In Power Query, I've the table "InterimForEarliestDateCalculation(2)" which contains fields :

  • "earliestStartDateCorrected" Date field
  • "earliestStartDateCorrectedv2" Date field

I'd like to add a custom column (Text): "ErrorInMilestonesDates" which would comply with :

= "Correct" if "earliestStartDateCorrected" = "earliestStartDateCorrectedv2"

= "Incorrect" if "earliestStartDateCorrected" <> "earliestStartDateCorrectedv2"

 

Could someone help me with the code?

 

Thanks in advance

 

Fab

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

Hi @Fab117 ,

 

try like:

if [earliestStartDateCorrected] = [earliestStartDateCorrectedv2] then "Correct" else "Incorrect"

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

Hi @Fab117 ,

 

try like:

if [earliestStartDateCorrected] = [earliestStartDateCorrectedv2] then "Correct" else "Incorrect"

This works perfectly.

 

Big thanks.

 

Fab

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors