9 Replies Latest reply: May 29, 2018 9:29 AM by Elie Issa RSS

    What to use instead of IF to make my expression faster

    Elie Issa

      Dear All,

       

       

      Can you please advise what is the alternative of the below nested if Statement to make the expression faster because it's taking too much time to generate the result on the screen :

       

      Expression :

       

      if ($(vNationalizationAvg26WeeksRatio) < 9/100 , rgb(255, 0, 0) ,

      if($(vNationalizationAvg26WeeksRatio) < 21/100 , Yellow() ,

        if($(vNationalizationAvg26WeeksRatio) < 26/100, rgb(216, 228, 188),

         if($(vNationalizationAvg26WeeksRatio) < 31/100, rgb(118, 147, 60),

          if($(vNationalizationAvg26WeeksRatio) < 37/100, rgb(79, 98, 40),

           if($(vNationalizationAvg26WeeksRatio) > 37/100, rgb(64, 63, 64), 'Black' ))))))

       

       

      vNationalizationAvg26WeeksRatio :


      avg(aggr($(vNationalizationRatioLast26Weeks),Week,[Business Unit]))

       

       

      Thanks.