2 Replies Latest reply: May 23, 2014 10:26 AM by ekta rathi RSS

    Average in a Line Graph

      Hi All,

       

      I am trying to plot running Average in a line graph.Below is an example of my data :--

       

      MonthSalesSum (Sales)Avg(Sales)
      1111
      2231.5
      3362
      44102.5
      55153
      66213.5
      71223.1428571
      82243
      93273
      104313.1
      115363.2727273
      126423.5

       

       

      'Month' and 'Sales' are data available in dataset.I have to make a line grph with two lines.First line is for Sum(Sales) and secong line is for Avg Sales.Average Sales should be some of all the sales till that month(including the given month) divided by count of months(including given month).But I am not sure how to plot this in qlikview.I tried having 'Month' as dimension, Sum(Sales) as first expression and Rangeavg(above((Sales),1,RowNo())) as second expression.But since I am using 'above' function in expression, the value is getting calculated from second month.Any suggestions would be really appreciated.