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
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
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.