Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I have two field namel 'Hour' and 'Id'......I have to construct a chart with a dimension as Range of hours...i.e..'0-1','1-2','2-3'...and so on....and my expression should be difference count(Id) for each hour......how to do this...pls help....

difference

1 Reply
vupen
Partner - Creator
Partner - Creator

One way is to build another table resident on the base table, something like this:


HourRangeSelect:
LOAD * INLINE [
KEY_SELECT_START, KEY_SELECT_STOP, TIME_RANGE

00:00, 00:59, 00:00-01:00
01:00, 01:59, 01:00-02:00
02:00, 02:59, 02:00-03:00
03:00, 03:59, 03:00-04:00
04:00, 04:59, 04:00-05:00
05:00, 05:59, 05:00-06:00
06:00, 06:59, 06:00-07:00
07:00, 07:59, 07:00-08:00
08:00, 08:59, 08:00-09:00
09:00, 09:59, 09:00-10:00
10:00, 10:59, 10:00-11:00
11:00, 11:59, 11:00-12:00
12:00, 12:59, 12:00-13:00
13:00, 13:59, 13:00-14:00
14:00, 14:59, 14:00-15:00
15:00, 15:59, 15:00-16:00
16:00, 16:59, 16:00-17:00
17:00, 17:59, 17:00-18:00
18:00, 18:59, 18:00-19:00
19:00, 19:59, 19:00-20:00
20:00, 20:59, 20:00-21:00
21:00, 21:59, 21:00-22:00
22:00, 22:59, 22:00-23:00
23:00, 24:00, 23:00-24:00
];
Join (HourRangeSelect) IntervalMatch(Hour) Load KEY_SELECT_START, KEY_SELECT_STOP Resident HourRangeSelect;


Then you can use the TIME_RANGE column as your Dimension.