Magic ETL

Magic ETL

Day of week Beast Mode Code

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

  • Coach
    Answer ✓

    Hi @ozarkram

    What errors are you receiving?

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

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

Answers

  • Coach
    Answer ✓

    Hi @ozarkram

    What errors are you receiving?

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

    1. Case when `Plant` ='Celes' and dayofweek(`orderdate`) in (2,3,4,5) then '50'
    2.  
    3. when `Plant` ='menes' and dayofweek(`orderdate`) in (2,3,4,5) then '90'
    4.  
    5. end
    6.  
    7.  
    **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

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In