Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

compare two tables & pick values

hi experts,

     i have a table with selective partno, description, date for a particular sales with specific dates.

     i have another table with all partnos(not selective), different dates for return of sales.

     Now, the return of sales table should compare with the previous sales table & display the partnos of return which are available in       

     sales table alone. how can i do this.

    pls help me out in this regard as soon as possible

10 Replies
Highlighted
Partner
Partner

Re: compare two tables & pick values

you should inner join the tables based on partno

Highlighted
Not applicable

Re: compare two tables & pick values

thanku ioannis giakoumakis.

i hav tried inner join. its not working.

too many records. so system hanging.

what actually i need is, the second table should compare the partnos with first table & second table should display the matching partnos alone.

any suggestions please

Highlighted
Partner
Partner

Re: compare two tables & pick values

what about using the exists function on the second table?

Highlighted
Not applicable

Re: compare two tables & pick values

no. exists function is also not working

Highlighted

Re: compare two tables & pick values

Have you tried using Left Keep or Left Join?

If you have some dummy data, it would be easier to do it in a sample qvw file

Best,

S

Highlighted
Partner
Partner

Re: compare two tables & pick values

join and exists are typical QV functions. They are working if applied correctly. Maybe a sample application would help.

Highlighted
Creator III
Creator III

Re: compare two tables & pick values

I believe where exists or look up function should work in your case.

Highlighted
Not applicable

Re: compare two tables & pick values

my tables are

FSSALE:

LOAD Week,

    StartDate,

    EndDate,

    PNO,

    DESC

FROM

QVD\FSSALE.qvd

(qvd);

FSSALE_2:

LOAD SALEDATE,

    PNO

FROM

QVD\FSSALE_2.qvd

(qvd);

Credit:

LOAD branch as BRCODE,

    Date(datelastedited,'DD/MM/YYYY') as CredDate,

    pno,

    pgcode,

    SL_qty,

    CR_qty

FROM

QVD\Credit.qvd

(qvd);

FSSALE is my first table. i hav got some loopings for first table to form the table FSSALE_2.

my next table is credit. the pno field from credit table is having records for all sales. it should get matched with PNO in the FSSALE table. & second table(credit) pno should display only the matching values with PNO in

Highlighted

Re: compare two tables & pick values

Try this:

FSSALE:

LOAD Week,

    StartDate,

    EndDate,

    PNO,

    DESC

FROM

QVD\FSSALE.qvd

(qvd);

FSSALE_2:

LOAD SALEDATE,

    PNO

FROM

QVD\FSSALE_2.qvd

(qvd);

Credit:

Left Keep (FSSALE)

LOAD branch as BRCODE,

    Date(datelastedited,'DD/MM/YYYY') as CredDate,

    pno as PNO,

    pgcode,

    SL_qty,

    CR_qty

FROM

QVD\Credit.qvd

(qvd);

Please note the parts which are bold.

Implement this and see if this works for you.

Best,

S