Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

How can I do something similar to Aggr() in script to group by a field for a Sum?

I am loading a data table with multiple fields. I need to do a group by for a sum on just one of those fields. I currently have it to where I get two tables, but I just want one table in the end. Here is what I currently have:

 

Table1:
LOAD [Company],
[Account],
[Document],
[Year],
[Date],
[Amount],
[Type],
[Center]
FROM
C:\File.xlsx
(ooxml, embedded labels, table is Sheet1);


LOAD
[Document],
If(Sum([Amount])<>0,'Open','Closed') as [Status]
Resident Table1
GROUP BY
[Document];

Is there another way I can do this so I can have just one table and all my fields as well?

1 Solution

Accepted Solutions
Highlighted
Master
Master

Re: How can I do something similar to Aggr() in script to group by a field for a Sum?

Maye be :

Table1:
LOAD [Company],
[Account],
[Document],
[Year],
[Date],
[Amount],
[Type],
[Center]
FROM
C:\File.xlsx
(ooxml, embedded labels, table is Sheet1);

left join

LOAD
[Document],
If(Sum([Amount])<>0,'Open','Closed') as [Status]
Resident Table1
GROUP BY
[Document];
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

View solution in original post

1 Reply
Highlighted
Master
Master

Re: How can I do something similar to Aggr() in script to group by a field for a Sum?

Maye be :

Table1:
LOAD [Company],
[Account],
[Document],
[Year],
[Date],
[Amount],
[Type],
[Center]
FROM
C:\File.xlsx
(ooxml, embedded labels, table is Sheet1);

left join

LOAD
[Document],
If(Sum([Amount])<>0,'Open','Closed') as [Status]
Resident Table1
GROUP BY
[Document];
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

View solution in original post