Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
valpassos
Creator III
Creator III

How to filter by hour?

Hi community,

I need to filter my data by date and time, like this:
From 20-March-2018 10:30
To 27-April-2018 12:30

How should I build the Time dimension? Does it need to be in the Date dimension table?

Thanks,

Lisa

Labels (1)
5 Replies
valpassos
Creator III
Creator III
Author

Oh, and also, do I need to have 2 calendars to filter this way, From/To time periods?

Thanks in advance 🙂

shiveshsingh
Master
Master

Hi

Can you try this?

Timestamp( Field,'YYYY-MM-DD hh.mm') 

valpassos
Creator III
Creator III
Author

Hi @shiveshsingh ,

That's what I have right now, but that solution doesn't let me filter by time intervals, like >= 09/05/2019 12.00 <= 10/05/2019 13.00. This doesn't work.
Also, I should have a Time conformed dimension, no? Or should it be collapsed in the Date dimension?

Thanks,

Lisa

shiveshsingh
Master
Master

Hi Lisa

You can have time embedded dimension in Model itself, and then modify it while using in expressions.

 

Thanks

mahaveerbiraj
Creator II
Creator II

Hi , 

you can create two inline table with each one column call StartDate =(Timestamp( YourDateField,'YYYY-MM-DD hh.mm') ) and EndDate =(Timestamp( YourDateField,'YYYY-MM-DD hh.mm') )  ,Create filter pane for both StartDate And EndDate 

and then Store the selected value in Variable call vStartDate= GetFieldSelections(StartDate ) and

vEndDate=GetFieldSelections(EndDate )   and use those variable in SetAnalysis  like below:

Sum({<YourDateField={"<=$(=vEndDate)>=$(=vStartDate)"}>} TXN_AMOUNT)  

 

Let me know if your not clear with this work around........