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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
amars
Specialist
Specialist

Using two table's in a load statement

Hi all,

I want to use the field's from two tables's within a Load statement, but the table's are not related. Basically I want to show entries within 0 -3 Month, 3 -6 month's, 6month-1 Year, 1 year - 2 year. What should I do?

Thanks in Advance

2 Replies
dolphin123
Contributor II
Contributor II

Hey,

u have 2 possibilities ..

1:::: concatenate the tables and keep a flag field for the bucket u want to create (If u donot have common key for both tables..).

2:::: use join toget the data from 2 tables if u have any common key in both the tables

Not applicable

tblGROUP:
LOAD
Invoice,
invoice_date,
val,
qty,
'0 - 3 mths' as Period
FROM TABLE1
WHERE invoice_date < date(addmonths(date(monthstart(today()),'MMM-YYYY'),1)) and invoice_date >= date(addmonths(date(monthstart(today()),'MMM-YYYY'),-2)) ;

Concatenate
LOAD
order_no, // or invoice_no
Order_date, // or invoice_date
val,
qty,
'3 - 6 mths' as Period
FROM TABLE2
WHERE invoice_date < date(addmonths(date(monthstart(today()),'MMM-YYYY'),-3)) and invoice_date >= date(addmonths(date(monthstart(today()),'MMM-YYYY'),-5));

Concatenate

Etc………………

let me know how you get on,

regards,

FC