Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Historical comparison in line chart


Suppose I've got a table of EventIDs each with a corresponding StartDateTime. I'd like to have a line graph with the horizontal dimension as the week of the year (e.g. 12/3/2012, 12/10/2012 etc.) and one expression as the count of EventIDs during a given week with another expression as the average of the three weeks prior to the given week.

I've loaded the data 3 additional times, each time with an additional +1 week offset. This can't be the way to go. Any suggestions? Thank you! -Reid

I'm aggregating the event dates by week during a LOAD statement with

Dual(WeekStart(StartDateTime), Year(StartDateTime)*100+Week(StartDateTime)) as StartWeekYear,

and I'm giving the offset to the additional tables with

Dual(WeekStart(StartDateTime + 7), Year(StartDateTime + 7)*100+Week(StartDateTime + 7)) as StartWeekYear,

1 Reply
Not applicable

Re: Historical comparison in line chart

Accumulation would let me get a moving average, but I'd like to be able to use the average value within another expression.