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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Time as a Dimension

Hi all,

I am trying to use the following as a dimension with no luck.  What am I missing? 

Thanks

time(date(Opportunity.CreatedOn,'YYYY/MM/DD hh:mm:Ss'),'hh TT') as Hour_Created

Example:

12 PM  and then counting the number of opportunities created at 12 PM.

15 Replies
MarcoWedel

Hi Thom,

the trick is to let only the hour part of your timestamp count as a distinct value.

All formatting time functions (time, date, timestamp) do not change the numerical representation of your Opportunity.CreatedOn timestamp and therefore are not sufficient per se.

Therefore you have to round or truncate the timestamp to full hours or extract it's hour part.

Possible solutions are e.g.:

QlikCommunity_Thread_121185_Pic2.JPG.jpg

QlikCommunity_Thread_121185_Pic3.JPG.jpg

QlikCommunity_Thread_121185_Pic4.JPG.jpg

a not functioning example would be:

QlikCommunity_Thread_121185_Pic5.JPG.jpg

because this expression does not remove the differences of the minutes part of the timestamp.

hope this helps

regards

Marco

tmumaw
Specialist II
Specialist II
Author

Thanks Marco,

That was exactly what I was looking for.

Thom

MarcoWedel

You're welcome

regards

Marco

Not applicable

how do i create a hourly list box ?

MarcoWedel

open a thread and describe your requirements in detail

Not applicable

This is my thread how to create master calender link with bi-hourly time

you have provided a solution, but since i have to join 3 tables and each table has timestamp filed. I am able to create master calender but the issue time. Here is my list box from date and time. I would like to know why  iam not getting unique time .date-time.PNG.png