1 Reply Latest reply: Aug 9, 2016 1:06 PM by Clever Anjos RSS

    Invalid expression help

    David Capan

      Hello,

       

      I'm receiving an invalid expression error when trying to create a flag in my script.  I'm not sure what I'm doing wrong.  Can anyone help me?

      LOAD

      %METRIC_KEY,

      if(TARGET_VARIANCE = 'U',

      if(if(MASK_DISPLAY = '#.##%', num(sum(NUMERATOR)/sum(DENOMINATOR), '#,##0.00%'),

      Median(MEDIAN))<THRESHOLD_TARGET), 'Bad',

        if(if(MASK_DISPLAY = '#.##%', num(sum(NUMERATOR)/sum(DENOMINATOR), '#,##0.00%'),

      Median(MEDIAN))>= sum(THRESHOLD_TARGET) and if(MASK_DISPLAY = '#.##%', num(sum(NUMERATOR)/sum(DENOMINATOR), '#,##0.00%'),

      Median(MEDIAN))< if(MASK_DISPLAY = '#.##%', num(TARGET, '0.00%'),

      TARGET), 'OK', 'Good')),

      if(if(MASK_DISPLAY = '#.##%', num(sum(NUMERATOR)/sum(DENOMINATOR), '#,##0.00%'),

      Median(MEDIAN))<TARGET, 'Good',

        if(if(MASK_DISPLAY = '#.##%', num(sum(NUMERATOR)/sum(DENOMINATOR), '#,##0.00%'),

      Median(MEDIAN))<= THRESHOLD_TARGET and if(MASK_DISPLAY = '#.##%', num(sum(NUMERATOR)/sum(DENOMINATOR), '#,##0.00%'),

      Median(MEDIAN))> if(MASK_DISPLAY = '#.##%', num(TARGET, '0.00%'),

      TARGET), 'OK', 'Bad'))) as Flag

      Resident FACT_temp

      Group by %METRIC_KEY;

       

       

      Thank you in advance.