Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
salezian
New Contributor II

join and aggregate

Hi Dear Qlikview Experts

I have 2 tables

TABLE A:

customer_id

item_id

amount

TABLE B:

item_id

dimension1

Question is: is it possible to join and aggregate data to dimension1 level in QlikView ? At the end I would like to have in QlikView results of SQL query:

Select customer_id,dimension1,sum(amount) from TABLE_A inner join TABLE_B on TABLE_A.item_id=TABLE_B.item_d. I know I can do it using SQL statement in script, but is it possible to do it QlikView engine ?

2 Replies

Re: join and aggregate

Hi

   Are you like this?

A:

Load * Inline

[

Customer_id,Item_id,amount

1,1,100

2,2,200

4,3,300

4,3,400

];

B:

Load * Inline

[

Item_id,dimension1

1,XXX

3,YYY

4,ZZZ

];

C:

NoConcatenate

LOAD Customer_id,Item_id,Sum(amount) as Amount Resident A Group by Customer_id,Item_id;

Inner join(C)

LOAD Item_id,dimension1 Resident B;

DROP Tables A,B;

salezian
New Contributor II

Re: join and aggregate

Thanks for your answer. I'm afraid that result of your script won't be the same as result of following sql query:

customer_id,dimension1,sum(amount) from TABLE_A inner join TABLE_B on TABLE_A.item_id=TABLE_B.item_d

group by customer_id,dimension1

I need to group data in TABLE A by using dimension from TABLE B

Community Browser