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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Function Switch

I'm experiencing some problems with the switch function and I can not find the correct syntax.

Furthermore I would like to change a different variable "VAR" as follow:

=switch Country
case 'FR'
LET VAR = 'France';
case 'UK'
LET VAR = 'UnitedKinkgdoms';
default
LET VAR = 'Else';

end switch

Could you suggest one solution?

Thank you very much for your help, it drives me crazy!![:)].

r.

1 Reply
Not applicable
Author

Hi,

I can able see only one issue in your syntax.

Just remove Equal before the switch syntax and see.

Your syntax shoud be like this.


let Var = 'QW';

Switch Var

Case 'QW'

Let Var='I`m in QW';

Case 'AB'

Let Var='I`m in AB';

Default

Let Var='I`m in Default';

end switch



- Sridhar