Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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.

Tags (1)
3 Replies
gopalopsharma
Contributor

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

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.

joonasjaspi
New Contributor III

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

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
New Contributor II

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

very useful code. thanx a lotSmiley Happy

Community Browser