Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data Restriction On Time & Date

Hi,

I have a scenario where data consists of Date & Time. Now If User wants to see report then it should show values from Yesterday 6.00AM to Today 6.00 AM.Please look into it.

Thanks in Advance

1 Solution

Accepted Solutions
maxgro
MVP
MVP

PFA


test:

Load

  *,

  Date + Time as DateTime;

LOAD userId,

    Date,

    Time

FROM Test.xls

(biff, embedded labels, table is Sheet1$);

search string on field DateTime

= '>=' & (today()-14-1/4) & '<=' & (today()-14+3/4)

when you have record for today and yesterday in your excel, remove -14

View solution in original post

11 Replies
alexandros17
Partner - Champion III
Partner - Champion III

When you open the document use the trigger OnOpen (settings -> document properties -> triggers -> onopen -> add -> select in field then write your date time field name and in the lower box write the condition

Anonymous
Not applicable
Author

Thanx Alessandro.......Could you please elaborate it more....

Not applicable
Author

Hi Himanshu,

What Alexandro meant was goto Document Properties >> refer screenshot below and add the value in search string.

Anonymous
Not applicable
Author

Hi Krishna,

I appreciate your effort....But seriously I am not getting how to show data from yesterday 6.00AM to Today 6.00AM 

Not applicable
Author

Can you post sample .qvw with relevant data so that I can help you on this issue.

Anonymous
Not applicable
Author

In the screenshot from HareKrishna enter the search string:

= '>=' & timestamp(today()-1/4) & '<=' & timestamp(today()+3/4)

Edit:  The example above is 6 PM to 6 PM.  For AM:

= '>=' & timestamp(today()-3/4) & '<=' & timestamp(today()+1/4)

Anonymous
Not applicable
Author

Here I have attached sample data...Now suppose today 16Feb'15....In dashboard it should show data from 15Feb 6.00 AM to 16Feb 6.00AM .....In this manner...Did You get my point????

maxgro
MVP
MVP

PFA


test:

Load

  *,

  Date + Time as DateTime;

LOAD userId,

    Date,

    Time

FROM Test.xls

(biff, embedded labels, table is Sheet1$);

search string on field DateTime

= '>=' & (today()-14-1/4) & '<=' & (today()-14+3/4)

when you have record for today and yesterday in your excel, remove -14

Anonymous
Not applicable
Author

Hi Massimo,

Thanks a  Lot......I got correct answer...Could you please explain the logic???