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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with Group By

Hi,

I am trying to load records from resident table but I am having problem, please see below:

SALES:
LOAD
CUSTNO,
VOL_ACTUAL,
ITEMNO
FROM (ooxml, embedded labels, table is Sheet3);

COMPARE:
LOAD
CUSTNO,
SUM (VOL_ACTUAL) AS VOL_ACTUAL
RESIDENT
SALES
GROUP BY
CUSTNO;

DROP TABLE SALES;

The above works fine, but when i include the ITEMNO, in says that there is an invalid expression:

SALES:
LOAD
CUSTNO,
VOL_ACTUAL,
ITEMNO
FROM (ooxml, embedded labels, table is Sheet3);

COMPARE:
LOAD
CUSTNO,
SUM (VOL_ACTUAL) AS VOL_ACTUAL,
ITEMNO
RESIDENT
SALES
GROUP BY
CUSTNO;

DROP TABLE SALES;

How can i include the ITEMNO field in the LOAD? Thanks in advance.

1 Solution

Accepted Solutions
Not applicable
Author

Dear try this one .......

COMPARE:
LOAD
CUSTNO,
ITEMNO,

SUM (VOL_ACTUAL) AS VOL_ACTUAL

RESIDENT
SALES
GROUP BY
CUSTNO,ITEMNO;

Bhushan N

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hello,

As you are using group by in your load statement, you should include field ITEMNO in group by.

Regards

Not applicable
Author

Dear try this one .......

COMPARE:
LOAD
CUSTNO,
ITEMNO,

SUM (VOL_ACTUAL) AS VOL_ACTUAL

RESIDENT
SALES
GROUP BY
CUSTNO,ITEMNO;

Bhushan N