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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to write Nested If in Set Analysis?

Hi,

I have a query like

=IF(MajorSiteRegion in ('3.P.L','Corus','Fremont','India','Livermore','Metryx','San Jose','Silfex','Tualatin','Villach'),MajorSiteRegion)

In Qlikview it wont allow IN function. How to write the same in Set Analysis or any other alternate way..

Sub2u444    

1 Solution

Accepted Solutions
sunny_talwar

Not sure where you are doing this. Is there any aggregation? If not then may using Match or WildMatch function:

If(Match(MajorSiteRegion, '3.P.L', 'Corus', 'Fremont', 'India', 'Livermore', 'Metryx', 'San Jose', 'Silfex', 'Tualatin', 'Villach'), MajorSiteRegion)

View solution in original post

3 Replies
sunny_talwar

Not sure where you are doing this. Is there any aggregation? If not then may using Match or WildMatch function:

If(Match(MajorSiteRegion, '3.P.L', 'Corus', 'Fremont', 'India', 'Livermore', 'Metryx', 'San Jose', 'Silfex', 'Tualatin', 'Villach'), MajorSiteRegion)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

And if you're talking about set analysis then you can use something like:

count({<MajorSiteRegion={'3.P.L','Corus','Fremont','India','Livermore','Metryx','San Jose','Silfex','Tualatin','Villach'}>} distinct MajorSiteRegion)

That means count the distinct values of MajorSiteRegion that match the values in the list. This useless example should return 10.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks for the reply.

I am using it as Dimension, so i used the above one.It works fine.

Thanks for the reply.