Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
ektarathi
Contributor III
Contributor III

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.

1 Solution

Accepted Solutions
SergeyMak
Partner Ambassador
Partner Ambassador

Hi Just try 0 instead of 1

Rangeavg(above((Sales),0,RowNo()))

Regards,
Sergey

View solution in original post

2 Replies
SergeyMak
Partner Ambassador
Partner Ambassador

Hi Just try 0 instead of 1

Rangeavg(above((Sales),0,RowNo()))

Regards,
Sergey
ektarathi
Contributor III
Contributor III
Author

Thank you sooo much Sergey!!That worked!!!

Thanks a lot!