Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why is this preceding load not working

load.png

gets me the following error

Invalid expression

Data:

Load * Inline [

User, Doc

Holden,AR

Holden,SA

Holden,IA

Holden,ED

Holden,CS

Aaron,CS

Brent,AR

Brent,SA

Brent,IA

Brent,ED

]

Any help appreciated, thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think you need to aggregate only per user (i.e. GROUP BY User), not by all three fields, which is too granular.

View solution in original post

18 Replies
swuehl
MVP
MVP

If you want to use aggregation functions like Sum() in your LOAD, you need to use a GROUP BY clause for all fields that are not embedded in aggregation functions.

sasiparupudi1
Master III
Master III

You can not have aggregations in the preceeding loads.

change it to a resident load using the necessary group by statements.

finaltype is the problem as it is a result of aggregation

hth

Sasi

Not applicable
Author

I'm not sure I understand.

The following script is still returning errors.

load2.png

Not applicable
Author

Okay, I did this resident load, and it works except the last sum = 3, for Admin doesn't show up

resi.pngresult.png

swuehl
MVP
MVP

Your top most star symbol will consider Type field as field which is not included in the GROUP by clause.

Clever_Anjos
Employee
Employee

Dont use * into your first load but

load

User,

Doc,

sum.....

swuehl
MVP
MVP

Your second load only creates 2 distinct values at most.

Not applicable
Author

Ahk, youre right. Same issue though, the admin where type sum = 3 isnt showing upresult.png2pree.png

sasiparupudi1
Master III
Master III

I do not see a condition for type value 3 in your logic?