Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Bitmuster
Contributor II
Contributor II

How to create a custom table with time-slots like 08:00 - 09:00, 09:00 - 10:00

Hi all, 

I am new to Qlik and would like my table below

Default TableDefault Table

 

to look like this:

Wanted lookWanted look

I would like to see the revenue per hour; as seen in the table above I would need 10 timeslots and would like to accumulate the revenues for those slots. Would it be better/easier to join time and date to one datetime-field? 

Do you have any suggestions how to solve this via Qlik?

Thank you in advance!

Labels (1)
1 Solution

Accepted Solutions
salonicdk28
Creator II
Creator II

Hi,

You can create bucket or grouping based on your requirement like below in your script editor-

IF(Time>='8:00' and Time<='9:00','08:00-09:00',IF(Time>='9:00' and Time<='10:00','09:00-10:00',
IF(Time>='10:00' and Time<='11:00','10:00-11:00'))) as NewTime

View solution in original post

3 Replies
Or
MVP
MVP

Load *, Hour(Time) as Hour

From YourTable;

You can then use Hour as your dimension alongside date.

salonicdk28
Creator II
Creator II

Hi,

You can create bucket or grouping based on your requirement like below in your script editor-

IF(Time>='8:00' and Time<='9:00','08:00-09:00',IF(Time>='9:00' and Time<='10:00','09:00-10:00',
IF(Time>='10:00' and Time<='11:00','10:00-11:00'))) as NewTime

Bitmuster
Contributor II
Contributor II
Author

Thank you for the tipp regarding buckets. Never heard about that before... It works!!!