Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Yousef_Amarneh
Partner - Creator III
Partner - Creator III

Get all items that weren't sold

Hello,

I have 2 tables, the first one is "Sales Transactions" and the second on is "Inventory", I need to get all items that weren't sold when thier quantity in the inventory is greater than zero.

Thanks.

Yousef Amarneh
11 Replies
sujeetsingh
Master III
Master III

Hi,

Just join the two tables with key

And with set analysis you can get what you want cant you please give details of the fields in both tables

Yousef_Amarneh
Partner - Creator III
Partner - Creator III
Author

Thank you for your reply, please see the attached sample of data.

Yousef Amarneh
sujeetsingh
Master III
Master III

Hi,

see the sample

Here you can get the complete data with one table and bnow you can filter the data according to your need.

Or explain that to me i will do it.

Yousef_Amarneh
Partner - Creator III
Partner - Creator III
Author

Hi,

Could you please use the data that I attached in the excel? I need the items that weren't sold, so the result should be item 9 and 10.

Thanks

Yousef Amarneh
sujeetsingh
Master III
Master III

See this sample

Yousef_Amarneh
Partner - Creator III
Partner - Creator III
Author

Thank you

Yousef Amarneh
Not applicable

This will return you only the items you wanted:

Table1:

LOAD * INLINE [

    ItemCode, SalesQu, SalesDate, SalesAmount, Flag

    1, 12, 06/12/2012, 100, 1

    2, 1, 06/12/2011, 200, 1

    3, 2, 06/12/2012, 120, 1

    4, 4, 06/12/2012, 300, 1

];

join

Table2:

LOAD * INLINE [

    ItemCode, transDate, QuantityINOut, transType

    1, 12/12/2009, 20, in

    2, 12/12/2009, 10, in

    3, 12/12/2009, 10, out

    4, 12/12/2009, 30, out

    9, 12/12/2009, 100, out

    10, 12/12/2009, 110, out

];

FinalTable:

NoConcatenate

load *

Resident Table1

where Flag <> 1;

drop table Table1;

Yousef_Amarneh
Partner - Creator III
Partner - Creator III
Author

I need this data after a specific date that the user will select, for example I need a report represent all items that weren't sold from 6/10/2013 till now, this is another problem

Yousef Amarneh
paulyeo11
Master
Master

Hi Yousef

Can you share with me what are the reasons you need to know those items in inventory not sold before ?