Magic ETL

Magic ETL

Y/N Function

I have a month goal, how do i write a Beast mode that showcase if a month or date goal is met? Below is the code I am using to showcase the goals of each month

Tagged:

Best Answer

  • Coach
    Answer ✓
    1. CASE WHEN `Amount` >=
    2. CASE
    3. WHEN MONTHNAME(`Date`) = 'October' THEN 12
    4. WHEN MONTHNAME(`Date`) = 'November' THEN 9
    5. WHEN MONTHNAME(`Date`) = 'December' THEN 9
    6. WHEN MONTHNAME(`Date`) = 'January' THEN 12
    7. WHEN MONTHNAME(`Date`) = 'February' THEN 12
    8. WHEN MONTHNAME(`Date`) = 'March' THEN 12
    9. End
    10. THEN 'Goal Met'
    11. WHEN `Amount` >=
    12. CASE
    13. WHEN MONTHNAME(`Date`) = 'October' THEN 12
    14. WHEN MONTHNAME(`Date`) = 'November' THEN 9
    15. WHEN MONTHNAME(`Date`) = 'December' THEN 9
    16. WHEN MONTHNAME(`Date`) = 'January' THEN 12
    17. WHEN MONTHNAME(`Date`) = 'February' THEN 12
    18. WHEN MONTHNAME(`Date`) = 'March' THEN 12
    19. End
    20. THEN 'Goal NOT Met'
    21. ELSE 'Goal Not Set'
    22. END
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • Coach
    Answer ✓
    1. CASE WHEN `Amount` >=
    2. CASE
    3. WHEN MONTHNAME(`Date`) = 'October' THEN 12
    4. WHEN MONTHNAME(`Date`) = 'November' THEN 9
    5. WHEN MONTHNAME(`Date`) = 'December' THEN 9
    6. WHEN MONTHNAME(`Date`) = 'January' THEN 12
    7. WHEN MONTHNAME(`Date`) = 'February' THEN 12
    8. WHEN MONTHNAME(`Date`) = 'March' THEN 12
    9. End
    10. THEN 'Goal Met'
    11. WHEN `Amount` >=
    12. CASE
    13. WHEN MONTHNAME(`Date`) = 'October' THEN 12
    14. WHEN MONTHNAME(`Date`) = 'November' THEN 9
    15. WHEN MONTHNAME(`Date`) = 'December' THEN 9
    16. WHEN MONTHNAME(`Date`) = 'January' THEN 12
    17. WHEN MONTHNAME(`Date`) = 'February' THEN 12
    18. WHEN MONTHNAME(`Date`) = 'March' THEN 12
    19. End
    20. THEN 'Goal NOT Met'
    21. ELSE 'Goal Not Set'
    22. END
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

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