Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys. I been googling alot without success.
I would like to create some moving average measures for sales for the last 6, 12 months in a line chart.
At the moment I am just displaying the last choosen amount of months with
Date = {">=$(=addmonths(monthstart(today()), -6))"},
What I would like to do is take the sum of the sales for the last 6 months and divide it by 6 to distribute the sales evenly throughout a 6 month period to see a trend
Any help is appreciated
BR
Joe
hi,
data:
load MonthName(Orderdate) as MonthYear,ID,sales;
load * Inline [
ID,Orderdate,sales
A123,01/01/2022,200
B123,01/02/2022,100
C568,01/03/2022,150
C568,01/04/2022,180
C568,01/05/2022,50
C568,01/06/2022,90
C568,01/07/2022,950
C568,01/08/2022,70
C568,01/09/2022,30
C568,01/10/2022,50
C568,01/11/2022,500
C568,01/12/2022,200
];
in chart i am using a measure
rangeavg(above(sum(sales),0,6))
can refer this link :
https://community.qlik.com/t5/QlikView-App-Dev/Moving-Averages-in-Charts/td-p/373666
Thanks!
I used
rangeavg(above(sum({<Date = {">=$(=addmonths(monthstart(today()), -6))"} >}(Sales),0,6))
hi,
data:
load MonthName(Orderdate) as MonthYear,ID,sales;
load * Inline [
ID,Orderdate,sales
A123,01/01/2022,200
B123,01/02/2022,100
C568,01/03/2022,150
C568,01/04/2022,180
C568,01/05/2022,50
C568,01/06/2022,90
C568,01/07/2022,950
C568,01/08/2022,70
C568,01/09/2022,30
C568,01/10/2022,50
C568,01/11/2022,500
C568,01/12/2022,200
];
in chart i am using a measure
rangeavg(above(sum(sales),0,6))
can refer this link :
https://community.qlik.com/t5/QlikView-App-Dev/Moving-Averages-in-Charts/td-p/373666
Thanks!
I used
rangeavg(above(sum({<Date = {">=$(=addmonths(monthstart(today()), -6))"} >}(Sales),0,6))