4 Replies Latest reply: Feb 13, 2012 6:30 AM by Jason Michaelides RSS

    Problem Area chart with negative values

      Hello all.

       

      I'm seen what I consider anunexpected behavior with the Area Chart when the expression returns negative values.

       

      I've 3 values, min, mediaand max. Generally they are always positive, but cases can exist where all ofthem are negative or, i.e., min and media are negative and max are positive.

      The area chart iscumulative, so the fist expression returns the min value, the second the differencebetween media and min (this is always positive), and the third expressionreturns the difference between max and media (also positive).

       

      In cases where the minvalue is negative the area charts doesn't show correctly. I can manage to solvethis when the three values (min, media, max) are negative duplicating expressionand taking in consideration if the values are positive or negative.

      But when I've min and medianegative and max positive it's seem impossible to show the correct value.

       

      I attach an example whereyou can appreciate this. If you have any idea of what is wrong or how solve it,please tell me!

       

       

      Thanks

      Regards,

      Cristian

       

      Example of whit positive values:

        • Re: Problem Area chart with negative values
          Jason Michaelides

          Sorry Cristian - it looks correct to me, although some of the figures don't match between the line graphs and the area charts (e.g. Val3 on line chart 3 = +15 but in Area Chart 3 you've used -15.

           

          I've used variables to be certain of using the same figures and re-posted here.  As I say - looks correct to me (unless I'm missing your point!?)

           

          Hope this helps,

           

          Jason

            • Problem Area chart with negative values

              Hello Jason,

               

              Thanks for your quickresponse. The goal is that the area chart matches the lines position of chartsat the left of the document. The area charts I've made where just intents toobtain that, but I couldn't in some cases.

              On the other hand, theexpressions to use have to be unique in order to work in all cases (withpositive values, negatives, and mix of them).

               

               

              I thinks something don'twork right because chart area is cumulative. The second value is added to thefirst, the third value is added to the second, etc.

              I.e. If I've V1 = 100 andV2=150, when you use area chat you need to put Expression1 = 100, Expressión2 =50

               

              When you get into negativesvalues, the plot is not correct. I.e. if I've V1= -100 and V2= -50 and usingthe same expressions:

              E1 = -100 and E= 50 (-100 - (-50))

              The area chart limits inthis cases aren´t -100 and -100 + 50 (because is cumulative). Qlikview shows-100 and 50 (the absolute value). So when the value is positive it behaves in acumulative way, but when it's negative it don't behaves in a cumulative way norin absolute way.

               

               

              Regards,

              Cristian