Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing between periods of time

Hi,

I'm dealing with working accidents database. Each accident has a date field. I want to calculate the number of accidents during a requested period of time (for example: first quarter of 2010) and then compare it to the number of accidents in the same quarter of the previous year. In fact, I want to divide those two numbers (number of accidents in current period / number of accidents in similar previous period) to see if the result is bigger than 1 or not.

Can I do this in QlikView? Can I do this for each period of time? (month,year etc.)

Thanx!

🙂

3 Replies
Not applicable
Author

Hi,

sounds as if it could be done with QV 😉

Make a cyclic group with the kinds of periods you want to see (months, weeks, quarters...).

Summarize over time, make a second expression with the period minus 1 (with set-expression).

Whereas period stands for week, month or whatever you have chosen.

And then you can divide, for example with column(2)/column(3). So you get your value bigger or smaller than 1 🙂

HTH

Not applicable
Author

Thank you for your quick reply! 🙂

I will give it a shot

Nitzan

Not applicable
Author

I tried your tip but it seems that I don't fully understand where to insert the "period - 1" statement... Do I add it to the cyclic group when I creat it (under Settings -> Document properties) or in the chart that I've added? I just can't find this set -> expression button that you described...

And another small question - you said that I can devide the results of the two periods to see if it's bigger than one or not. Can I creat a Gauge chart and connect that result to it? I mean: 1 will be the center line, above it will be the right area and below it will be the red area...

Thanx

Nitzan