Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
chrismtb
Creator
Creator

Compare qvw open time to in-line range table

This will be an easy one no doubt...

I have an in-line table I am loading into QlikView:

upper_timelower_timeExp_Load_Time
04:4523:4521:15
08:4504:4502:15
12:4508:4506:15
16:4512:4510:15
20:4516:4514:15
23:4520:4518:15

The simple task I have is to display via an expression (in a text object) the correct Exp_Load_Time based on the Now() function.

I am using Now(2) for the document open time.

So if the open time was 15:41 I would want to return in the text box 10:15 as this is greater than 12:45 and less than or equal to 16:45

I assume it is set analysis that is needed but despite several attempts I have never been very good at it!

All help appreciated.

Chris

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Chris,

in Text Box

=Only({<Rowno={"$(=Min({<upper_time={'>=$(=Time(Now(1)))'}>} Rowno))"}>} Exp_Load_Time)

My Time is 17:34 (Now(1))

Regards,

Antonio

View solution in original post

3 Replies
Anil_Babu_Samineni

May be this?

=Only({<Exp_Load_Time = {">=12:45 <=16:45"}>} If(Time(Now(2),'hh:mm') = '15:41', '10:15'))

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
antoniotiman
Master III
Master III

Hi Chris,

in Text Box

=Only({<Rowno={"$(=Min({<upper_time={'>=$(=Time(Now(1)))'}>} Rowno))"}>} Exp_Load_Time)

My Time is 17:34 (Now(1))

Regards,

Antonio

chrismtb
Creator
Creator
Author

Antonio - works like a charm Thanks!!