Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Switch & Calculate Issue

Hi Folks,   I'm trying to set up a performance type scenario. What I want to do is this:   If they received between a 3 or 3.5 in FY16 and FY17 then they are a core performer. If they received a ...
  • Greg_Deckler's avatar
    Greg_Deckler
    8 years ago

    You just have to work this until you get your logic correct.

     

    For example, by your stated rules, Donald Duck gets an N/A because his FY17 score is NOT less than 3.

     

    Performance? = 
    VAR Rating = SWITCH(
    TRUE(),
    [FY16]>=4 && [FY17]>=4,"High Performer", 
    ([FY16]>=3 && [FY16] <= 3.5) && ([FY17] >= 3 && [FY17]<=3.5),"Core Performer",
    [FY16] < 3 && [FY17] < 3,"Low Performer",
    "N/A"
    )
    RETURN Rating

    For your second one, maybe something like this:

     

    Performance2 = 
    VAR Score = [FY17]+[FY16]/2
    VAR Rating = SWITCH(
                        TRUE(),
                        Score>=4,"High Performer",                    
                        Score>=3 && Score <= 3.5,"Core Performer",
                        Score < 3,"Low Performer",
                        "N/A"
                    )
    RETURN Rating

    These formulas work for their defined rules, but you will have to edit in your own rules.