Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

General Script Error caused by group where concatenation

While developing a QlikView report I came across a "general script error" caused by a WHERE clause in a grouped load. It's reproducable using the script pasted below. If I enable logging, the logfile does not contain any more details as to why this error is thrown.

Have I encountered a bug, or is there a logical reason why this shouldn't work?

In the meanwhile I've found a workaround by first constructing a second NoConcatenate table, which I then later concatenate and drop in consecutive separate statements.

NoConcatenate

Tab1:

LOAD * INLINE [

FactRowNo, Factor

1, 0.5

1, 0.3

2, 1

3, 0.9

];

Concatenate (Tab1)

LOAD

  1-SUM(Factor) As Factor,

  FactRowNo

WHERE

  1-SUM(Factor) > 0

GROUP BY

  FactRowNo;

LOAD * RESIDENT Tab1;

LogFile:

10/03/2014 11:37:56:       General Script Error

10/03/2014 11:37:56:       Execution Failed

10/03/2014 11:37:56:      Execution finished.

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

It is not a bug, simply you cannot use an aggregate function in where condition (if it was SQL you could by an embedded Select, in qlik no)

Hope it helps

View solution in original post

2 Replies
alexandros17
Partner - Champion III
Partner - Champion III

It is not a bug, simply you cannot use an aggregate function in where condition (if it was SQL you could by an embedded Select, in qlik no)

Hope it helps

Not applicable
Author

In SQL I would indeed use the HAVING clause for this. Good to know nothing similar is supported in Qlik.

Would be nice if the script would throw an error with a textual description stating that these two can't be used together.