Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
JAN. 24, Q&A with Qlik: Making the Move to Qlik Cloud Reporting: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
its_rajvir
Contributor III
Contributor III

Show data by current time

Dear Experts,

need your help to extract some data.

I have a table like this :

Hour Sales
8 to 9 100
9 to 10 400
10 to 11 267
11 to 12 135
12 to 13  156
13 to 14 789

 

Now for example if the current time is from 9 to 10 it should only show that particular hour data not the other ones. then in the next run it should show next hour data on the dashboard.

1 Solution

Accepted Solutions
MayilVahanan

Hi

Try like below

LOAD * INLINE [
Hour, Sales
8 to 9, 100
9 to 10, 400
10 to 11, 267
11 to 12, 135
12 to 13 , 156
13 to 14, 789
]Where Trim(SubField(Hour,' ', 1)) = Hour(Now());

Might be, it helps or give idea 

Thanks & Regards,
Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

Hi

Try like below

LOAD * INLINE [
Hour, Sales
8 to 9, 100
9 to 10, 400
10 to 11, 267
11 to 12, 135
12 to 13 , 156
13 to 14, 789
]Where Trim(SubField(Hour,' ', 1)) = Hour(Now());

Might be, it helps or give idea 

Thanks & Regards,
Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
SchalkF
Contributor III
Contributor III

Hi @MayilVahanan ,

I just took yours and used it in a visual instead of in the load.

I use the same clause as MayilVahanan just in an if statement in a chart.  Please see below screenshot:

SchalkF_0-1667974828908.png