Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
vittorianad
Contributor III
Contributor III

How to load field value as sum() of different field's table

Hi,

let's say I have 

Order:
load
     id_order,
    date_order,
    id_client
from [qvd\order.qvd] (qvd);

lineOrder:
load
    id_order,
    id_line_order,
    ammount_line
from [qvd\orderline.qvd] (qvd);

I need the total ammount calculated on the Order table. 

How can I get this?

I want the Order table to be

Order:
load
    id_order,
    Date_order,
    id_client,
    total_ammount_order
from [qvd\order.qvd] (qvd);

Thanks to all

2 Replies
martinpohl
Partner
Partner

Hi,

Orders:
load
     id_order,
    date_order,
    id_client
from [qvd\order.qvd] (qvd);

left join (Orders)
load
    id_order,
    id_line_order,
    ammount_line
from [qvd\order.qvd] (qvd);

 

left join (Orders)

load

id_order,

sum(ammount_line) as sumorder

resident Orders

group by id_order;

 

Regards

vittorianad
Contributor III
Contributor III
Author

hi,

I want to keep separated the Order and the Orderline table,

the code you suggest does the left join...

Instead ....

left join (Orders)

load

id_order,

sum(ammount_line) as sumorder

resident Orders

group by id_order;

return me and error as invalid statement!!