Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Whats Wrong with this?

Hello Experts,

I am trying to create custom Hierarchial groups of customers from Level1 and Level2 so I am writing the below statement while loading the script, but it returns an error. Can someone please correct me with this?



CONCATENATE LOAD

if

(LEVEL1_CODE = 'D00027' AND if(LEVEL2_CODE = 'D00027000'),'Y', 'N') as TEST

FROM

[XYZ.QVD];





Thanks in Advance.

4 Replies
Not applicable
Author

CONCATENATE LOAD

if

(LEVEL1_CODE = 'D00027' AND LEVEL2_CODE = 'D00027000'),'Y', 'N') as TEST

FROM

[XYZ.QVD];

use this in place of your previous code

Thanks

gandalfgray
Specialist II
Specialist II

You have a syntax error here:

if(LEVEL2_CODE = 'D00027000')

an if statement needs to have a condition, a then case and an optional else case.

You only have a condition above.

Not applicable
Author

Well I think you are right. But I was wondering if this is the right way to create a Hierarchy by selecting one customer from Level 1 and 3 from Level 2 , to use them in Pivot charts??

llauses243
Creator III
Creator III

Hi,

This is my offer ...

God luck, Luis