Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Group By

hi,

I have applied group by as:

A:

LOAD

     max(ShiftStartDate) as ShiftStartDate,

    max(ShiftEndDate) as ShiftEndDate,

      REF_AgentName,

        REF_acdId

   

FROM

D:\Qvd\Employee.qvd

(qvd) group by  REF_AgentName,REF_acdId;

Now there are more fields also which I want to fetch.

how can I add fields in table A from same qvd.

Thnks

1 Solution

Accepted Solutions

Re: Group By

Use inner join to keep only records where the fields match in both tables:

LOAD

     max(ShiftStartDate) as ShiftStartDate,

    max(ShiftEndDate) as ShiftEndDate,

      REF_AgentName,

        REF_acdId

  

FROM

D:\Qvd\Employee.qvd

(qvd) group by  REF_AgentName,REF_acdId;

inner join

load Field1, Field2,....etc

from D:\Qvd\Employee.qvd (qvd);


talk is cheap, supply exceeds demand
4 Replies
sushil353
Honored Contributor II

Re: Group By

you can do a join to this table...with the main table

Not applicable

Re: Group By

If I am applying join in this than that will affecting my data.

Actually I want to :

REF_acdId according to max(date) only , so that only unique REF_acdId can come.

It is coming by using group by but if I apply join than duplicate REF_acdId is coming.

hope you are understanding the problem.

Re: Group By

Use inner join to keep only records where the fields match in both tables:

LOAD

     max(ShiftStartDate) as ShiftStartDate,

    max(ShiftEndDate) as ShiftEndDate,

      REF_AgentName,

        REF_acdId

  

FROM

D:\Qvd\Employee.qvd

(qvd) group by  REF_AgentName,REF_acdId;

inner join

load Field1, Field2,....etc

from D:\Qvd\Employee.qvd (qvd);


talk is cheap, supply exceeds demand
sushil353
Honored Contributor II

Re: Group By

Please post the sample data...

Community Browser