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
KieronMullan
Frequent Visitor

IF Statement that updates a date based on another column

Hi Folks, hope someone can help.  This is super easy in Excel, but I am struggling in PBI.

 

I have a situation where I need to add x number of days from an existing date column IF the first 4 letters of another column contain a specific set of letters.  I have created the formula below, but am getting an error that says 'DAX comparison operations do not support comparing values of type Integer with value of type Text.

 

The outcome I am trying to achieve is if the Project ID column record contains 'REQD' as the first 4 letters, then add 10 days to the 'Issue_Date, otherwise, leave the Issue date as is.  Can anyone help with the formula needed?

 

Corrected Issue Date = IF(LEFT(TABLE A[Project_id],4 = "REQD"),TABLE A[Issue_Date]+10,TABLE A[Issue_Date])
 
Thanks in advance.
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @KieronMullan,

Believe your issue is with the parenteses try this instead


Corrected Issue Date = IF(LEFT(TABLE A[Project_id],4) = "REQD",TABLE A[Issue_Date]+10,TABLE A[Issue_Date])

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @KieronMullan,

Believe your issue is with the parenteses try this instead


Corrected Issue Date = IF(LEFT(TABLE A[Project_id],4) = "REQD",TABLE A[Issue_Date]+10,TABLE A[Issue_Date])

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thank You MFelix - really appreciate the quick response which did exactly what I needed

Cheers

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