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: 
alec1982
Specialist II
Specialist II

Issue with Where in the script

Hi Guys,

I am having issue with using where in the script. If I comment the Where statement I get data and if I add it no data will show on the table.

I noticed that the issue is in the and in the where statement..but not sure how to fix

ActualYTDBalance:

Load

Year,

Period,

Name,

Sum(AmountYTD) as  Amount

Resident AA2

where Name='1100' and Name='1105'

Group by Year,Period,Name;

Let me know if you can help!

Best,

Badr

1 Solution

Accepted Solutions
rbecher
MVP
MVP

Hi Badr,

it's an OR, the field can have only one value per record:

where (Name='1100' or Name='1105')

- Ralf

Astrato.io Head of R&D

View solution in original post

5 Replies
rbecher
MVP
MVP

Hi Badr,

it's an OR, the field can have only one value per record:

where (Name='1100' or Name='1105')

- Ralf

Astrato.io Head of R&D
MayilVahanan

Hi

Edit:

ActualYTDBalance:

Load

Year,

Period,

Name,

Sum(AmountYTD) as  Amount

Resident AA2

where Match(Name,'1100','1105')

Group by Year,Period,Name;

If you use AND function, it does not display any value because, a single row contain single name

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jagan
Luminary Alumni
Luminary Alumni

Hi,

Instead of OR you are using AND condition, because a Name field cannot have two values at a time.

ActualYTDBalance:

Load

Year,

Period,

Name,

Sum(AmountYTD) as  Amount

Resident AA2

where (Name='1100' OR Name='1105')

Group by Year,Period,Name;

Hope this helps you.

Regards,

Jagan.

VishalWaghole
Specialist II
Specialist II

Try this One, May this will help you


ActualYTDBalance:

Load

Year,

Period,

Name,

Sum(AmountYTD) as  Amount

Resident AA2

where Match(Name,'1100','1105')

Group by Year,Period,Name;

alec1982
Specialist II
Specialist II
Author

Thank you guys! I totally missed the and , or differences