1 Reply Latest reply: Sep 22, 2016 3:20 AM by Alejandro Sanchez Carrasco RSS

    Expressions nested in other expressions

      Hello to everyone!


      I hope somebody could help me with the problem I'm facing:


      In a external .qvs I'm setting the following variables:


      SET exp1 = Avg({1<Field1={'Value1'},Field2={'$1'}>}Field3);

      SET exp2 = 'Value2';

      SET exp3 = ((Sum({<Field3={$1}>}Field4 * Field5))/Sum({<Field3={$1}>}Field6));

      SET exp4 = If(QV_Show_Time='Quarterly',



        If($(exp1($(exp2)))>=($(exp3('Value3')) - 0.05) and $(exp1($(exp2)))<$(exp3('Value3')),

        ' ', vt_ColorNegative)));

      Where QV_Show_Time is also a Field, and vt_ColorPositive and vt_ColorNegative are colors defined using the RGB() function.

      I use the expression 'exp4' to compare two values and change the font color from a straight table. When I copy exp4 to  'Text Color' of the object it works fine. But if that expression is defined outside in a .qvs it doesn't work. I think that there is one ore more expressions that may be are called wrong (maybe using $(=exp)), but I tried almost all and I didn't found the mistake.



      I'll appreciate all the help.