Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
CreepyCatLady
Contributor III
Contributor III

If statement syntax

Hi all. I am very confused. I keep getting an error in the expression editor on the nested if statement below, and I can't figure out what is wrong with it. It says ")" expected, but all my parenthesis are closed.

=IF(HARDWARE_VENDOR_NAME='APPLE','Apple'&' '&HOST_DEVICE_TYPE_FULL&'-'&REGION,
if(HARDWARE_VENDOR_NAME='MICROSOFT' AND REGION-='ABCD', 'Microsoft'&' '&HOST_DEVICE_TYPE_FULL&'-'&REGION))

Can anyone tell me where the problem is? Thanks so much!

1 Solution

Accepted Solutions
saran7de
Master
Master

REGION-='ABCD'

This is not allowed. This is Set Analysis Syntax.

Try this,

=If(Match(HARDWARE_VENDOR_NAME,'APPLE','Apple'&' '&HOST_DEVICE_TYPE_FULL&'-'&REGION),
If(HARDWARE_VENDOR_NAME='MICROSOFT' AND REGION<>'ABCD', 'Microsoft'&' '&HOST_DEVICE_TYPE_FULL&'-'&REGION
)
)

View solution in original post

2 Replies
saran7de
Master
Master

REGION-='ABCD'

This is not allowed. This is Set Analysis Syntax.

Try this,

=If(Match(HARDWARE_VENDOR_NAME,'APPLE','Apple'&' '&HOST_DEVICE_TYPE_FULL&'-'&REGION),
If(HARDWARE_VENDOR_NAME='MICROSOFT' AND REGION<>'ABCD', 'Microsoft'&' '&HOST_DEVICE_TYPE_FULL&'-'&REGION
)
)

View solution in original post

CreepyCatLady
Contributor III
Contributor III
Author

Oh my goodness this was it! Thank you so much!