Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
I only want to show the min P_TIME.
So i want to add "AND P_TIME minimum value"
Hope u understand me?!
Use group by with required fields and then use Min(P_TIME) as AND P_TIME minimum value
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;
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
Try where P_TIME =Min(P_TIME )
I get Invalid expression when i try to do like u said?
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?
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
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
So i Should not use an Table Box?