Day of week Beast Mode Code

ozarkram
ozarkram Member
edited May 2022 in Magic ETL

Hi All,

I am trying to do the following calculation in Beast mode but I am getting some errors.. Can you please help me with this..

Case when Plant ='Celes' and dayofweek(orderdate) in (2,3,4,5) then '50'

when Plant ='menes' and dayofweek(orderdate) in (2,3,4,5) then '90'

end

Would appreciate your input!


Thanks,

Arun

Tagged:

Best Answer

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Hi @ozarkram

    What errors are you receiving?

    Have you use back ticks (`) in your beast mode?

    Case when `Plant` ='Celes' and dayofweek(`orderdate`) in (2,3,4,5) then '50'
    
    when `Plant` ='menes' and dayofweek(`orderdate`) in (2,3,4,5) then '90'
    
    end
    
    
    
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓

    Hi @ozarkram

    What errors are you receiving?

    Have you use back ticks (`) in your beast mode?

    Case when `Plant` ='Celes' and dayofweek(`orderdate`) in (2,3,4,5) then '50'
    
    when `Plant` ='menes' and dayofweek(`orderdate`) in (2,3,4,5) then '90'
    
    end
    
    
    
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Hi @GrantSmith : Sorry this was a mistake at my end..Happy Friday! and Happy weekend