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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.