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

  • GrantSmith
    GrantSmith Coach
    Answer ✓
    CASE WHEN `Amount` >=
    CASE
    WHEN MONTHNAME(`Date`) = 'October' THEN 12
    WHEN MONTHNAME(`Date`) = 'November' THEN 9
    WHEN MONTHNAME(`Date`) = 'December' THEN 9
    WHEN MONTHNAME(`Date`) = 'January' THEN 12
    WHEN MONTHNAME(`Date`) = 'February' THEN 12
    WHEN MONTHNAME(`Date`) = 'March' THEN 12
    End
    THEN 'Goal Met'
    WHEN `Amount` >=
    CASE
    WHEN MONTHNAME(`Date`) = 'October' THEN 12
    WHEN MONTHNAME(`Date`) = 'November' THEN 9
    WHEN MONTHNAME(`Date`) = 'December' THEN 9
    WHEN MONTHNAME(`Date`) = 'January' THEN 12
    WHEN MONTHNAME(`Date`) = 'February' THEN 12
    WHEN MONTHNAME(`Date`) = 'March' THEN 12
    End
    THEN 'Goal NOT Met'
    ELSE 'Goal Not Set'
    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 ✓
    CASE WHEN `Amount` >=
    CASE
    WHEN MONTHNAME(`Date`) = 'October' THEN 12
    WHEN MONTHNAME(`Date`) = 'November' THEN 9
    WHEN MONTHNAME(`Date`) = 'December' THEN 9
    WHEN MONTHNAME(`Date`) = 'January' THEN 12
    WHEN MONTHNAME(`Date`) = 'February' THEN 12
    WHEN MONTHNAME(`Date`) = 'March' THEN 12
    End
    THEN 'Goal Met'
    WHEN `Amount` >=
    CASE
    WHEN MONTHNAME(`Date`) = 'October' THEN 12
    WHEN MONTHNAME(`Date`) = 'November' THEN 9
    WHEN MONTHNAME(`Date`) = 'December' THEN 9
    WHEN MONTHNAME(`Date`) = 'January' THEN 12
    WHEN MONTHNAME(`Date`) = 'February' THEN 12
    WHEN MONTHNAME(`Date`) = 'March' THEN 12
    End
    THEN 'Goal NOT Met'
    ELSE 'Goal Not Set'
    END
    

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