Assigning the same value to different days of the week

Options

Hi All,

I am using the following Beast mode (Goal) to assign the same value to Monday ,tuesday, wednesday and thursday for different plants..Can you please let me know if the below is fine..

  1. Case when `Plant` ='Celes' and dayofweek(`orderdate`) in (2,3,4,5) then '50'
  2. when `Plant` ='menes' and dayofweek(`orderdate`) in (2,3,4,5) then '90'
  3.  
  4. end
  5.  
  6.  


Best Answer

  • GrantSmith
    GrantSmith Coach
    Answer ✓
    Options

    Instead of keeping this logic within a beast mode I'd recommend using another dataset (Excel upload, Webform etc) with each of the different plant types and their goal for the day of the week and then use an ETL to left join your dataset to the goal dataset and then using a coalesce in a formula tile to set a default goal if one isn't found in your goal dataset.


    The concern with your beast mode is that it's hard to maintain and what happens for Sundays for Celes plants?

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓
    Options

    Instead of keeping this logic within a beast mode I'd recommend using another dataset (Excel upload, Webform etc) with each of the different plant types and their goal for the day of the week and then use an ETL to left join your dataset to the goal dataset and then using a coalesce in a formula tile to set a default goal if one isn't found in your goal dataset.


    The concern with your beast mode is that it's hard to maintain and what happens for Sundays for Celes plants?

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**