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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
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

18 Replies
Not applicable
Author

Oh, why is that?

How can I change it?

Not applicable
Author

If it is just CS,  the sum will be 1, if it is a doc not CS, the sum should be 2, and if it is both the sum should be 3.

Am I doing something wrong?

Not applicable
Author

Could you provide me with a solution that would work? For finalType to have 3 sections based on CS, no-CS, and both

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.

Not applicable
Author

But if I load in user and group by user, then I lose the docs in my final load.

So now I'm left with just User and FinalType, no list of docs.

Any ideas?

sasiparupudi1
Master III
Master III

If(DOC='CS',1,

If(DOC='AR',2,

If(DOC='IA',2,

If(DOC='ED',2,

If(DOC='SA',2

))))) As Type

The above condition is only giving values 1 and 2 as Type. Where is the classification that returns 3?

swuehl
MVP
MVP

Create another load for your detailed table.

Either join the table with user and FinalType to your original table or keep the tables linked by user.

Similar to what you have done in one of your previous answers.

Not applicable
Author

I see, yeah that's what I did, just loaded it in again and it joins on User. Seems weird that there isn't an easier solution than this though

Thanks for your all your help though!

Not applicable
Author

The 3 is gotten by the sum. So if user A has CS and ED, then it will be linked to both 1 and 2 under Type.

Then when I sum on distinct type, it should add up 1 and 2, and get 3, thus creating a third option.

There are 3 types of users in my data scenario, ones that can view CS docs, ones that can't view CS docs, and ones that can view both