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: 
Anonymous
Not applicable

how to display the required hours for a particular service?

Hi,

I have a datefield (myhours) and at present it shows all the hours from midnight to night 11 pm .

My requirement is to display only those messages between the operating hours between 09:00 am to 15:30 pm .

How can write the calculated dimension?

Any help is highly appreciated.

thanks.

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Try this may be?

= IF(Hour(Interval(created_at,'hh')) >= 9 AND Hour(Interval(created_at,'hh')) <16, Hour(Interval(created_at,'hh')))

View solution in original post

11 Replies
Anil_Babu_Samineni

May be this?

If(myhours > '09:00' and myhours < '15:30', myhours)

Or

If(myhours > '09:00 am' and myhours < '15:30 pm', myhours)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

No it is not displaying what i anticipated.

trdandamudi
Master II
Master II

Can you please post few sample rows of the data....

Anonymous
Not applicable
Author

test.png

trdandamudi
Master II
Master II

How does the data looks ? meaning is it 9 am or 09.00 am or 9 ...? Can you share the sample rows of the data...

Anonymous
Not applicable
Author

Yes it was a time stamp but i have used maketime funtion and display only hours .

It shows 09:00 hrs

trdandamudi
Master II
Master II

One solution is, in the backend table either create a new field with out 'hrs' tag  or have only one field with out 'hrs'.

Take  a look at the attached sample and hope this helps in the right direction:

vishsaggi
Champion III
Champion III

Try this may be?

= IF(Hour(Interval(created_at,'hh')) >= 9 AND Hour(Interval(created_at,'hh')) <16, Hour(Interval(created_at,'hh')))

Anil_Babu_Samineni

Can you provide sample data in excel for myhours, Please?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful