2 Replies Latest reply: Apr 12, 2012 12:15 AM by Jennifer XU RSS

    How to create a flexible Baseline in chart?

    Jennifer XU

      Hi All, I am a fresh developer of Qlikview. I meet a question during developing and hope any one could help me to find a solution.

       

      Now I have created a Bar Chart which shows the Sales Value rolling back 12 months from current month. However, I also should create a BaseLine in this chart which show the Max Sales Value of these 12 months. As you know, the month always change and the value will change too. So, how can I create a flexible baseline which can both show the max sales value of month and vary with time?

       

      Thanks a lot.

        • How to create a flexible Baseline in chart?
          Stefan Wühl

          Not sure how this baseline should look like, but you could try creating a reference line in presentation tab of your bar chart properties, enter as expression for this reference line

           

          =max(aggr(sum(Sales), Month))

           

          I assume Month is your field you are using as dimension in your chart.

           

          How have you limited your chart to the last 12 months? Using a calculated dimension? Then you probably don't need to do anything else.

          If you have limited the data using set analysis in your expression, you probably need to add this set expression to your aggr() expression, too, like

           

          =max({SETEXPRESSIONGOESHERE} aggr(sum({SETEXPRESSIONGOESHERE}Sales), Duration))

           

          Or maybe I have misunderstood your requirement, if so, please add some more information.