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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
jn55561n
New Member

I am having some issues with "DAXcomparison operations do not support comparing values of type...."

I am running into some issues with a formula i am trying to create.

I want to add a column that returns "missed", "picked-up", or leave it blank based on several parameters. I created the formula the same way i would in excel but my inexperience might be showing here.

 

The columns are formatted as text for Shipment number and dates for Planned load.end and Ac.GI/GR Date

 

Screenshot 2023-06-27 133701.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @jn55561n,

It seems like your expression are try to compare with different data type of values which Dax expression not supported.

For this scenario, I'd like to suggest you change these fields type or add convert function on your compare step to confirm the expression are compared with the same data type.

Missed vs Picked Up =
IF (
    AND (
        'Query1'[Shipment Number] <> "",
        DATEVALUE ( 'Query1'[Planned load. end] ) < TODAY ()
    ),
    IF ( 'Query1'[Ac.GI/GR Date] <> BLANK (), "Picked Up", "Missed" ),
    ""
)

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
jn55561n
New Member

Here is the DAX code:

 

Missed vs Picked Up =
IF (
AND (
'Query1'[Shipment Number] <> "",
AND ( 'Query1'[Planned load. end] < TODAY (), 'Query1'[Ac.GI/GR Date] <> "" )
),
"Picked Up",
IF (
AND (
'Query1'[Shipment Number] <> "",
AND ( 'Query1'[Planned load. end] < TODAY (), 'Query1'[Ac.GI/GR Date] = "" )
),
"Missed",
""
)
)

 

Screenshot 2023-06-27 134804.jpg

Anonymous
Not applicable

HI @jn55561n,

It seems like your expression are try to compare with different data type of values which Dax expression not supported.

For this scenario, I'd like to suggest you change these fields type or add convert function on your compare step to confirm the expression are compared with the same data type.

Missed vs Picked Up =
IF (
    AND (
        'Query1'[Shipment Number] <> "",
        DATEVALUE ( 'Query1'[Planned load. end] ) < TODAY ()
    ),
    IF ( 'Query1'[Ac.GI/GR Date] <> BLANK (), "Picked Up", "Missed" ),
    ""
)

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.