Forum Discussion

FranckGbadamass's avatar
4 years ago
Solved

M formula explanation

Hello community,

 

I'm stucked with M formula:

 

My formula doesn't return what I expected:

 

if [Hours] = {8,8.5,9,9.5,10,10.5,11,11.5} then "morning" else if [Hours] = {18,18.5,19,19.5} then "night" else "none"

 

I have none everywhere

 

Thank you very much for your help.

  • Hi FranckGbadamass ,

     

    Try this:

    if [Hours] >= 8 and [Hours] <= 11.5 then "morning"
    else if [Hours] >= 18 and [Hours] <= 19.5 then "night"
    else "none"

     

    Pete

1 Reply

  • Hi FranckGbadamass ,

     

    Try this:

    if [Hours] >= 8 and [Hours] <= 11.5 then "morning"
    else if [Hours] >= 18 and [Hours] <= 19.5 then "night"
    else "none"

     

    Pete