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
JamesMurg
Helper I
Helper I

DAX code help

Please help, we are trying to create visuals and for some reason our DAX code is showing an error
DAX comparison operations do not support comparing values of type Date with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.

But we have changed the format of both columns to date, could anyone shed any light on this please?

 

Column = IF('Findings'[Evaluation Date]="",IF('Findings'[Publish +90 days - Evaluation Due Date]>=TODAY(),"Outstanding","Overdue"),IF('Findings'[Publish +90 days - Evaluation Due Date]>='Findings'[Evaluation Date],"On Time","Late")

 

Thanks

James

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @JamesMurg ,

 

Please try below code:-

Column =
IF (
    'Findings'[Evaluation Date] = BLANK (),
    IF (
        'Findings'[Publish +90 days - Evaluation Due Date] >= TODAY (),
        "Outstanding",
        "Overdue"
    ),
    IF (
        'Findings'[Publish +90 days - Evaluation Due Date] >= 'Findings'[Evaluation Date],
        "On Time",
        "Late"
    )
)

and also change the datatype of column to text.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

4 REPLIES 4
Samarth_18
Community Champion
Community Champion

Hi @JamesMurg ,

 

Please try below code:-

Column =
IF (
    'Findings'[Evaluation Date] = BLANK (),
    IF (
        'Findings'[Publish +90 days - Evaluation Due Date] >= TODAY (),
        "Outstanding",
        "Overdue"
    ),
    IF (
        'Findings'[Publish +90 days - Evaluation Due Date] >= 'Findings'[Evaluation Date],
        "On Time",
        "Late"
    )
)

and also change the datatype of column to text.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

You are amazing!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

Thank you so much 😀

JamesMurg
Helper I
Helper I

Thanks Marek

 

This solution didnt work 😭

 

I am still looking for some help on this solution please?

 

James

marek_zarzycki
Regular Visitor

Hi,

When you're using double quotes "", it's a text. In your first IF, you are comparing date column with text. This is the reason of the error you get.


Try using ISBLANK() or LEN() = 0, depending on what values you are expecting in the column.

IF(ISBLANK('Findings'[Evaluation Date]),IF('Findings'[Publish +90 days - Evaluation Due Date]>=TODAY(),"Outstanding","Overdue"),IF('Findings'[Publish +90 days - Evaluation Due Date]>='Findings'[Evaluation Date],"On Time","Late")

or

IF(LEN('Findings'[Evaluation Date])=0,IF('Findings'[Publish +90 days - Evaluation Due Date]>=TODAY(),"Outstanding","Overdue"),IF('Findings'[Publish +90 days - Evaluation Due Date]>='Findings'[Evaluation Date],"On Time","Late")

Good luck 😉

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 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