Forum Discussion

AC23VM's avatar
AC23VM
Icon for Helper II rankHelper II
1 year ago
Solved

The syntax for 'RETURN' is incorrect

Hi there.  I've tried to write this formula 500 different ways.  I've tried DAX Formatter (which says this is fine) and even tried AI suggestions, but no matter what I get the same syntax error. V...
  • danextian's avatar
    1 year ago

    I don't see anything wrong with your formula. But the RETURN clause can simplified as _CountActualHarm + 0.

    Now this may not return 0 if for example you are trying to return it for October but there's no October  row 5 in your table and you're using the date column  from the same table. Simply put, you cant assign a value to a row that doesn't exist, 0 or not.  This why it is important to use  separate date/calendar table with a complete set of dates whether they exist in your fact table or not.