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

Help flagging minimum date (script below) - need urgent help

Hello,

I've been wrestling with this for days after a deadline - and cannot figure out a solution though I think it's probably simple.

I want to show the following:

1. All data included in "Raw" (below)

2. Flag the minimum datetime

3. Add a conditional statement that states if the PIR (pt in room) was between 6:55 and 8:35 a.m.

What I'm getting currently with PEEK function is flagging all the PIR times as 1 instead of just the min time.

Much appreciation!

SET DateFormat='MM/DD/YYYY';

SET TimestampFormat='MM/DD/YYYY hh:mm';

Raw:

LOAD * INLINE [

    Date, Room, SURGEON, Sched_Start, PIR

    11/21/2014, 1, Dr B, 11/21/2014 08:00, 11/21/2014 08:00

    11/21/2014, 2, Dr B, 11/21/2014 08:00, 11/21/2014 07:50

    11/21/2014, 3, Dr B, 11/21/2014 08:00, 11/21/2014 07:00

    11/21/2014, 4, Dr C, 11/21/2014 08:00, 11/21/2014 07:02

    11/21/2014, 5, Dr C, 11/21/2014 08:00, 11/21/2014 07:56

];

Data:

LOAD

Date,

Room,

SURGEON,

Sched_Start,

PIR,

If(Peek(PIR) <> PIR, 1, 0) AS Flag

RESIDENT Raw

ORDER BY SURGEON DESC;

18 Replies
Not applicable
Author

Hi Giacomo,

Thanks so much - this may be easier for me to integrate than the other which I'm too much of a newbie to make work correctly in the current load script.

One question - it's now just showing the first cases as below even though I have set the condition as 0...do you know what I'm doing incorrectly?

DateSURGEONRoomPIRMin_TIR
11/21/2014Dr B311/21/2014 07:001
11/21/2014Dr C411/21/2014 07:021
Not applicable
Author

Hi Giacomo,

Could you possibly send me your qv file so I may compare to the one I have?

Thank you so much for your help!

giacomom
Partner - Contributor III
Partner - Contributor III

Hi Karen,

sorry for my late response. How can I attach the file?

Giacomo

anbu1984
Master III
Master III

Click "Use Advanced Editor". Then click Attach

143948.png

giacomom
Partner - Contributor III
Partner - Contributor III

Hi Karen,

here it is my qvw file.

(Thanks anbu cheliyan, I was answering from the Inbox and the advanced editor was disabled).

Giacomo

Not applicable
Author

Hi Giacomo,

Thank you very much; apologies for late response have been in a Kaizen Event all week.

I cannot see the attached file; could I trouble you to re-attach?

Appreciate your help!

anbu1984
Master III
Master III

I can see the file. Attaching Giacomo's QVW

Not applicable
Author

Hi Anbu,

For some reason I cannot download the file.

Are you able to send to me at karen.wallace@health-first.org?

Appreciate your help!

Thank you,

Karen

Karen Wallace, MPH

Sr. Decision Support Analyst

Analytics & Business Intelligence

Health First, Inc.

3300 Fiske Blvd.

Rockledge, FL 32955

Office: 321-434-6637

E-Mail: Karen.Wallace@Health-First.org

>>> anbu cheliyan <qcwebmaster@qlikview.com> 12/4/2014 7:50 AM >>>

Qlik Community ( http://community.qlik.com/ )

Re: Help flagging minimum date (script below) - need urgent help

reply from anbu cheliyan (

http://community.qlik.com/people/anbu1984?et=watches.email.thread ) in

New to QlikView - View the full discussion (

http://community.qlik.com/message/672662?et=watches.email.thread#672662

)

I can see the file. Attaching Giacomo's QVW

Reply to this message by replying to this email, or go to the message

on Qlik Community (

http://community.qlik.com/message/672662?et=watches.email.thread#672662

)

Start a new discussion in New to QlikView by email (

mailto:discussions-community-discussionforums-newto--qlikview@qliktech-public.hosted.jivesoftware.com

) or at Qlik Community (

http://community.qlik.com/choose-container.jspa?contentType=1&containerType=14&container=2003&et=watches.email.thread

)

Following Re: Help flagging minimum date (script below) - need urgent

help (

http://community.qlik.com/message/672662?et=watches.email.thread#672662

) in these streams: Inbox

© 1993-2014 QlikTech International AB Copyright & Trademarks (

http://www.qlikview.com/us/info/copyright ) | Privacy (

http://www.qlikview.com/us/info/privacy ) | Terms of Use (

http://www.qlikview.com/us/info/terms-of-use ) | Software EULA (

http://www.qlikview.com/us/info/software-eula )

#####################################

This message is for the named person's use only. It may

contain private, proprietary, or legally privileged information.

No privilege is waived or lost by any mistransmission. If you

receive this message in error, please immediately delete it and

all copies of it from your system, destroy any hard copies of it,

and notify the sender. You must not, directly or indirectly, use,

disclose, distribute, print, or copy any part of this message if you

are not the intended recipient. Health First reserves the right to

monitor all e-mail communications through its networks. Any views

or opinions expressed in this message are solely those of the

individual sender, except (1) where the message states such views

or opinions are on behalf of a particular entity; and (2) the sender

is authorized by the entity to give such views or opinions.

anbu1984
Master III
Master III

Emailed QVW to your mail id