Calculated Column Syntax Error


Trying to create column(s) in my data set to see if payments were paid early, on their due date, or late.

I already have a column 'Due Date Minus Payment Date' 'DATEDIFF(`due_date`,`payment_date`)

but for some reason this next column keeps giving me an error saying "oops something went wrong.) It seems incredibly basic, I have no idea what I am missing here. (This is not even trying to look at Due Date Minus Payment Date in between 0 and 1.)

CASE WHEN `Due Date Minus Payment Date `>= 0 THEN 1 ELSE 0 end 

Not sure what I doing wrong here...


  • MarkSnodgrass

    The first thing to check is to make sure that the ETL sees your due date and payment date fields as dates. If they aren't you can fix that a couple different ways: on the input dataset, you can click on configuration and then expand data handling and set the data type as date. You can also wrap the DATE() function around each of those fields in your formula, which will make them date values as well. If it doesn't let you change the type, then you might have some non-date data that you need to fix.

    If they are all dates and you are still getting error, I have sometimes had to close the ETL and go back in and then click run preview to get the ETL to properly recognize the data and the new fields.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.