Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to plot running Average in a line graph.Below is an example of my data :--
Month | Sales | Sum (Sales) | Avg(Sales) |
1 | 1 | 1 | 1 |
2 | 2 | 3 | 1.5 |
3 | 3 | 6 | 2 |
4 | 4 | 10 | 2.5 |
5 | 5 | 15 | 3 |
6 | 6 | 21 | 3.5 |
7 | 1 | 22 | 3.1428571 |
8 | 2 | 24 | 3 |
9 | 3 | 27 | 3 |
10 | 4 | 31 | 3.1 |
11 | 5 | 36 | 3.2727273 |
12 | 6 | 42 | 3.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.
Hi Just try 0 instead of 1
Rangeavg(above((Sales),0,RowNo()))
Hi Just try 0 instead of 1
Rangeavg(above((Sales),0,RowNo()))
Thank you sooo much Sergey!!That worked!!!
Thanks a lot!