Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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.

Tags (3)
1 Solution

Accepted Solutions

Re: General Script Error caused by group where concatenation

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

2 Replies

Re: General Script Error caused by group where concatenation

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

Re: General Script Error caused by group where concatenation

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.

Community Browser