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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

DAX comparion operations do not support comparing values of type date with values of type text

I am trying to a create a column to populate with certain words if a criteria is met, however, I get 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"

What i want is  a column to say following.  I will be grateful if someone can help me to solve the error and write the formula. I tried writing both with Switch and If formula but same issue again and again.

  • UAT if
    • Mgr_Approved_Date not blank
    • UAT_Date blank
    • Project ID blank
  • Approved UAT if
    • UAT Date not blank
    • UAT Pass is True
    • Project ID blank

Switch(True(), 'Table'[Mgr_approved_date]<>"" && 'Table'[UAT Date]=""&& 'Table'[Project ID]="", "UAT",

'Table'[UAT PAss]"True" && 'Table'[UAT Date]<>""&& 'Table'[Project ID]="", "Approved UAT")

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous ,You have datediff to compare dates. isblank to check for blank values. And March 2020 support coalesce. means you can handle a null value.

if(isblank ([Date1]),,,

Or

if(not(isblank ([Date1])),,,

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @Anonymous ,

 

Can you try changing 'Table'[Mgr_approved_date]<>""  with ISBLANK( 'Table'[Mgr_approved_date])

Similarly for the other date .

 

Let me know if it worked.

 

Cheers

 

CheenuSing

Anonymous
Not applicable

@Anonymous Thank you for responding. I tried that and it gave me new error that it doesn't support True/False type. 

 i also tried the following in "Custom Column" of Power Query but it failed too 

if[Mgr_Approved_Date]<>"" and [UAT_Date]="" and [Project_ID]=""
then "UAT"
else if [UAT_Date]<>"" and [Project_ID]="" and [UAT_Passed]="True"
then "Approved UAT"
else if [UAT_Returned_Date]<>"" and [Project_ID]=""
then "Return to Sender"

else if [Dsp_Assign_Date]<>"" and [FBOA_Approved_Date]="" [FBOA_Denied_Date]=""

then "Pendnig QC"

else if [FBOA_Approved_Date]="" and [Deployed_Date]="" then "Passed QC" else if [Deployed_Date]<>"" and [Status]="CPCreated"

then "Deployed"

else if [Reconciliation_Complete_Date]<>"" and [Status]="Closed"

then "Deployment Complete"

else ""

Anonymous
Not applicable

Hi @Anonymous ,

 

I tried the following computed column in a table in my file and it worked perfectly

 

Test = IF( ISBLANK('Tool data'[Ship date]) && ISBLANK('Tool data'[FA date]) && 'Tool data'[Sort field] = "END OF LIFE" ,"YES","No")
 
Just check if your date columns are type date.
 
Cheers
 
CheenuSing

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors