Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load problem

Hi, I have this problem that I dont know how to load this.

LOAD EMP,

     P_DATE,

     P_TIME, 

     P_TYPE

FROM

*****

WHERE EMP = '146' AND P_DATE = '2014-01-14' AND P_TYPE = 1;

this gets this:

Skärmavbild 2014-06-25 kl. 09.54.48.png

I only want to show the min P_TIME.

So i want to add "AND P_TIME minimum value"

Hope u understand me?!

13 Replies
sujeetsingh
Master III
Master III

Use group by with required fields and then use Min(P_TIME) as AND P_TIME minimum value

MK_QSL
MVP
MVP

LOAD P_DATE,

     MIN(P_TIME),

     P_TYPE

FROM

****

WHERE EMP = '146' AND P_DATE = '2014-01-14' AND P_TYPE = 1

Group By P_DATE, P_TYPE;

alexandros17
Partner - Champion III
Partner - Champion III

If you want to do in the script then write:

MYTAB_TMP:

LOAD EMP,

     P_DATE,

     P_TIME,

     P_TYPE

FROM

*****

WHERE EMP = '146' AND P_DATE = '2014-01-14' AND P_TYPE = 1;

left join

Load EMP,P_DATE, min(P_TIME) as minimum

from

...

where

...

Group by EMP,P_DATE;

MYTAB:

noconcatenate

Load *, if(P_TIME=minimum, 1, 0) as flagmin resident MYTAB_TMP;

frop table MYTAB_TMP;

now you can use flagmin to show yourr data

selvakumarsr
Creator
Creator

Try where P_TIME =Min(P_TIME )

Not applicable
Author

I get Invalid expression when i try to do like u said?

Not applicable
Author

Thanks, but, with this I get 2 rows, with flagmin 1 on the row I want to display, the other row is still there but with flagmin 0..

I only want to get 1 row in the load result. how would i do that?

alexandros17
Partner - Champion III
Partner - Champion III

Yes, you're right,

now in your chart write in the dimension EMP:

=If(flagmin=1, 'EMP', null())

and check the box suppress null values ....

let me know

Not applicable
Author

Try this P_TIME =Min(P_TIME )..and else if you are facing the issue again then ckicl on this link..

Qlikview Courses, Training & Tutorial Online | Intellipaat.com

Not applicable
Author

So i Should not use an Table Box?