Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
Not applicable

Resident and Group by

Hello!

I get a invalid expression error on this scipt when trying to use sum and group by and its driving me insane. Any help?

VAtmp:

LOAD

     PART_NO,
     CONTRACT,
     ISSUE_QTY,
     Month
FROM
Z:\xxxx\xxxx\Extracted\Sup.QVD
(qvd);


VA:

LOAD

    PART_NO,
     CONTRACT,
     sum(ISSUE_QTY) as sumQTY,
     Month
    
Resident VAtmp Group by PART_NO;

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Resident and Group by

You need to either use an aggregation function around CONTRACT (could be something like concat(CONTRACT) as concatCONTRACT, only(CONTRACT) as CONTRACT or count(CONTRACT) as countCONTRACT or whatever appropriate)

or add CONTRACT to your group by fields (...group by PART_NO, CONTRACT; )


View solution in original post

2 Replies
MVP
MVP

Re: Resident and Group by

You need to either use an aggregation function around CONTRACT (could be something like concat(CONTRACT) as concatCONTRACT, only(CONTRACT) as CONTRACT or count(CONTRACT) as countCONTRACT or whatever appropriate)

or add CONTRACT to your group by fields (...group by PART_NO, CONTRACT; )


View solution in original post

daveamz01
Contributor III

Re: Resident and Group by

Hello,

     You should group by all non-calculated fields: 

VA:

LOAD

    PART_NO,
     CONTRACT,
     sum(ISSUE_QTY) as sumQTY,
     Month

Resident VAtmp Group by PART_NO, CONTRACT, Month;