4 Replies Latest reply: Mar 28, 2012 10:30 AM by Robert Valanzola RSS

    If Then Else with Sum Not Working

      Help, I am new to Qlikview and ready to go crazy.


      I have SQL and .NET experience and I am trying to do something that is so easy using those tools.


      In my QVW document, I have a chart, and within that chart I am trying to build an Expression.


      Here is the simple English:


      If the rProcedure Class Code field has a value of 'MR', then sum the numeric value of the rUnits field.


      Here is the QV syntax.


      If([rProcedure Class Code])='MR', Sum(rUnits))


      I get an Expression OK, but the If Then Else seems to have no effect on my chart.


      If I do not do the If Then Else, and simply sum rUnits, I get desired results.


      I also tried doing an UPPER and TRIM, in case there were any extra characters or mixed case characters, with no success. And I checked the table for the existance of 'MR' and it was there. Seems so simple. What am I doing wrong?