Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

rolling n period (avg) line chart qlik sense

Hi


I have the following Expression to make a rolling 52/53 week avg (rolling n period)

Count(distinct [OrderID] ) as a 1st measure

rangeavg(above(Count(distinct [OrderID] ),0,53)) as a 2nd measure (this is my rolling n period)

WeekEnd(OrderDate) as a dimension

date period from 2013 to the present

I wish the second measure to start from 2014, but I seem to loose the avg values if I place the exclusion {<Year-={'2013'}>} please help

the avg 2013 values are needed to calculate the n period

please help

1 Solution

Accepted Solutions
sunny_talwar

Try this

RangeAvg(Above(Count(DISTINCT {<Year>} [OrderID]), 0, 53)) * Avg({<Year-={'2013'}>} 1)

View solution in original post

2 Replies
sunny_talwar

Try this

RangeAvg(Above(Count(DISTINCT {<Year>} [OrderID]), 0, 53)) * Avg({<Year-={'2013'}>} 1)

joeybird
Creator III
Creator III
Author

Hi

Sunny your amazing as always

works brill

thank you