Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count concurrent users when start and end times are known for each user sessions

I have application License Analyzer which reads Qlikview log files for the sessions.

there are start and duration, computed end time for each user sessions.

How to compute or present concurrent sessions, for example one session start at yyyy.mm.dd 10:30 am and ends at 10:50, and an other started at 10:45 and and end at 10:55 all at the same date.

So between 10:45 and 10:50 there was two cuncurrent sessions, at other times only one.

We are looking for all times as yyyy.mm.dd h:mm that are overlapping.

3 Replies
gopalopsharma
Creator
Creator

Hello Timo,

I assume you need to count the users in the predefined time intervals.

e.g.

Time Interval     #Users

12am-1am          4

1am-2am            3

etc.

For doing this you need to create a mapping table which will create different intervals and then load the data on the basis of these intervals.

Please refer to "IntervalMatch" Load functionality provided by Qlikview.

Anonymous
Not applicable
Author

You can also use loop and group by to get number of concurrent sessions

Temp:

LOAD

ID,

1 as Counter,

[Session Start] + IterNo()/24/60-(1/24/60) as TimestampTemp

Resident Data

While [Session Start] + IterNo()/24/60-(1/24/60) <= Timestamp;

ConcurrentCounts:

Load

    Date(TimestampTemp, 'YYYYMMDD') &'_'& Hour(TimestampTemp)&'_'& Minute(TimestampTemp) as DateMinuteKey,

    SUM(Counter) as SessionsCounter

Resident Temp

GROUP BY Date(TimestampTemp, 'YYYYMMDD') &'_'& Hour(TimestampTemp)&'_'& Minute(TimestampTemp);

Use DateMinuteKey for linking into Calendar table.

canariam
Contributor III
Contributor III

very useful code. thanx a lot:)