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
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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Kudoed Authors