Forum Discussion

Jay2022's avatar
Jay2022
Icon for Helper IV rankHelper IV
2 years ago
Solved

IF &&&&

I'm trying to add a new column but keep getting an error message that the syntax is incorrect    Before April 2024 = IF('Table'[Order Date]>"30/03/2024"  && ('Table'[Store]=Store A,"Before April...
  • ChiragGarg2512's avatar
    2 years ago

    Jay2022 If 'Table'[Order Date] is in date format, try this

    Before April 2024 =
    IF('Table'[Order Date]> DATE(2024, 03, 30)
     && ('Table'[Store]=Store A),"Before April 2024","No")

    The reason for error is the date is written as "30/03/2024" which makes it a string and thus can't be compared with a date column.