Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Switch function between two values

I need to put some values into buckets.  I believe the switch function is the way to go, but I'm not sure how it works when I need one of the criteria to fall in between two values.  This is what I n...
  • Greg_Deckler's avatar
    7 years ago

    Two possible ways to do this:

     

    TIME AT FINAL = SWITCH (
    TRUE (),
    'QA'[AVG TIME AT DESTINATION] <75,"0-75",
    'QA'[AVG TIME AT DESTINATION] >75 && 'QA'[AVG TIME AT DESTINATION]<105,"75-105"
    'QA'[AVG TIME AT DESTINATION] >105,">105"
    )
    
    
    or
    
    TIME AT FINAL = SWITCH (
    TRUE (),
    'QA'[AVG TIME AT DESTINATION] <75,"0-75",
    ''QA'[AVG TIME AT DESTINATION] >105,">105",
    "75-105"
    )