Year = current year

If my booking year = system year then cy else py

not sure what was the error in beast mode..pls suggest

CASE 

WHEN YEAR(`Booking Year Nbr`)= YEAR(CURDATE(),"CY" ELSE "PY" END

Comments

  • Some minor tweaks to your beast mode:

    CASE 
    WHEN YEAR(`Booking Year Nbr`)= YEAR(CURDATE()) THEN "CY"
    ELSE "PY"
    END
    
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • ST_Superman
    ST_Superman Domo Employee

    Hi @RajNadar

    It would help to understand what format `Booking Year Nbr` is in.

    CASE 
    WHEN `Booking Year Nbr` = YEAR(CURDATE()) THEN 'CY' 
    WHEN `Booking Year Nbr` = YEAR(CURDATE())-1 THEN 'PY' 
    ELSE 'Other' 
    END