Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I'm a bit new to Qlikview, but I'm wondering if there is possible to work with the data i load, for example, if I load, data from to tables can I then in Qlikview calclulate, ex. amount = 12 and time = 2 and do 12/2 = 6 and then display 6. and so on?
Or do i need to make all calculations, modifications and so before loading it in to qlikview?
thanks in advance!
In simple terms yes you can do it in Qlikview, the question is; "is it the right place to do it". Remember about future proofing your corporate business logic to be product agnostic.
Hi,
can you share your Punches.qvd If possible
then provide sample data to work.
Regards,
Hi,
Im still having some troubles..
When i do this load:
punches:
LOAD
P_DATE as date,
P_TYPE,
If(P_TYPE=1,'In') as timestart,
If(P_TYPE=2,'Out') as timeend
FROM
i get this ( se image )
And changing load to:
LOAD
P_DATE as date,
P_TYPE,
If(P_TYPE=1,time(P_TIME/1440,'hh:mm')) as timestart,
If(P_TYPE=2,time(P_TIME/1440,'hh:mm')) as timeend
FROM
i get this ( se image )
I want it to be
date - in - out
in one row, I hope u understand what I mean.?
( the 0 line i dont want to load. )
you can try something like below
Table1:
ID, Date, In
Table2:
ID,Date, Out
Join Table1 and Table2
can u please show example? where to specify load, from and so on.. thx!
There are somany ways of doing this.You can either choose do to in script or in the object itself.
You might want to add the NAME or ID to the below loads, because I see multiple records for a date.
TableName:
LOAD
P_DATE as date,
If(P_TYPE=1,time(P_TIME/1440,'hh:mm')) as timestart
FROM
WHERE
P_TYPE=1;
Join(TableName):
LOAD
P_DATE as date,
If(P_TYPE=2,time(P_TIME/1440,'hh:mm')) as timeend
FROM
WHERE
P_TYPE=2;
Okey, now i have made some small progress. but still need to get one thing more right..
I have made som selections so i can show u easy. the line with the arrow to the right is the one i want to show, and only that line. ( I guess that there are 2 of each P_TYP=1 and P_TYPE=2 if u look at the result. )
my code is:
timestart:
LOAD
EMP,
P_DATE as date,
If(P_TYPE=1,time(P_TIME/1440,'hh:mm')) as timestart
FROM
WHERE P_TYPE=1;
Join(timestart)
LOAD
EMP,
P_DATE as date,
If(P_TYPE=2,time(P_TIME/1440,'hh:mm')) as timeend
FROM
WHERE P_TYPE=2;
Join(timestart)
LOAD iUserID as EMP,
szName AS namn
FROM
Load
*,
interval(timeend-timestart,'hh:mm') AS workedtime
Resident timestart;
I think it is doing a Cartesian join, Modified the second load, can you try this .
Join(timestart)
LOAD
EMP,
P_DATE as date,
If(P_TYPE=1,time(P_TIME/1440,'hh:mm')) as timestart,
If(P_TYPE=2,time(P_TIME/1440,'hh:mm')) as timeend
FROM
WHERE P_TYPE=2;