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

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
Saravanan_Desingh

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
Saravanan_Desingh

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
)
)

CreepyCatLady
Creator
Creator
Author

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