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

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

Create a Column for a Field

Good Day All

I Have a Problem, But when i Join it,

the output is not like what i want

EmpCodeTimeCodeTimeLogs
Sample1F118:00
Sample2F118:30
Sample1F127:00
Sample2F127:30

The Output must be like

EmpCodeTimeInTimeOut
Sample18:007:00
Sample28:307:30

TimeCode is F11=Timein and the F12=TimeOut

The output of my Application is

EmpCodeTimeInTimeOut
Sample18:00-
Sample28:30-
Sample1-7:00
Sample2-7:30

I tried to use all kind of Joins but no effect

Thank you.

18 Replies
Not applicable
Author

You could flatten this with a Generic Load, but easier to just load and then Join... something like this:

LogData:

LOAD EmplCode,

     TimeLogs As TimeIn

FROM

TimeLogs.xlsx

(ooxml, embedded labels, table is Sheet1)

WHERE TimeCode='F11';

Left Join Load

          EmplCode,

    TimeLogs As TimeOut

FROM

TimeLogs.xlsx

(ooxml, embedded labels, table is Sheet1)

WHERE TimeCode='F12';

Not applicable
Author

I've try it, All kinds of join but there's no Output

Sokkorn
Master
Master

Hi Raem,

Let try with inline and map it into your datasource

[Data]:

LOAD * INLINE [

EmpCode    ,    TimeCode    ,    TimeLogs

Sample1    ,    F11    ,    8:00

Sample2    ,    F11    ,    8:30

Sample1    ,    F12    ,    7:00

Sample2    ,    F12    ,    7:30];

 

[TimeLog]:

LOAD

    EmpCode,

    TimeLogs    AS [TimeIn]

Resident [Data] Where TimeCode = 'F11';

[TimeLog2]:

LEFT JOIN ([TimeLog])

LOAD

    EmpCode,

    TimeLogs    AS [TimeOut]

Resident [Data] Where TimeCode = 'F12';

Regards,

Sokkorn

Not applicable
Author

Good Day Sir,

     I attach my QVD for your reference

Sir Sokkorn there no output for the TimeOut.

Thank you for your response

nagaiank
Specialist III
Specialist III

The attached sample application seems to do what you want.

Not applicable
Author

Good Day Sir,

i already did that but the timeout is null.

Kindly see the attach file of mine for your reference

Not applicable
Author

Hi,

Please find the attached file..

Hope it helps you..

//Chandra

Not applicable
Author

Good Day kindly see the picture this is the output.

sampletocom.jpg

Not applicable
Author

hi

Data:

LOAD EmpCode,

     TimeCode,

     TimeLogs

FROM

(ooxml, embedded labels, table is Sheet1);

[TimeLog]:

LOAD

    EmpCode,

    TimeLogs    AS [TimeIn]

Resident [Data] Where TimeCode = 'F11';

[TimeLog2]:

LEFT JOIN ([TimeLog])

LOAD

    EmpCode,

    TimeLogs    AS [TimeOut]

Resident [Data] Where TimeCode = 'F12';

then output like this

EmpCodeTimeInTimeOut
sample18:00:007:00:00
sample28:30:007:30:00