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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
RealEstate2018
Contributor II
Contributor II

Scripting

Hi Guys,

Currently I have a  variable formula    =num($(eRSFPerTotalAttorneys), '#,##0')  that says....

give me the size of all locations and divide it by the number of all attorneys for all locations.  Here is the set analysis I have set for this Variable...  

SET eRSFPerTotalAttorneys = $(eRSF) / $(eTotalAttorneys);

SET eRSF = 'sum(Size)';

SET eTotalAttorneys = 'sum([Total Number of Attorneys])';

Can someone please help me modify the Set analysis to exclude Beijing and Shanghai locations?

I tried this but it comes up as blank ... 

SET eRSFPerTotalAttorneyss = $(eRSFF) / $(eTotalAttorneyss);

SET eRSFF = 'sum({<City-={'Beijing', 'Shanghai', 'Taipei'}>}(Size)'; //without Asia

SET eTotalAttorneyss = 'sum({<City-={'Beijing', 'Shanghai', 'Taipei'}>} [Total Number of Attorneys]) '; //without Asia

 

When I don't try to exclude anything, it populates as 6408, but when I try to exclude these locations, it comes up blank

 

clipboard_image_0.png

Labels (1)
1 Solution

Accepted Solutions
asinha1991
Creator III
Creator III

I see a possible issue

SET eRSFF = sum({<City-={'Beijing', 'Shanghai', 'Taipei'}>}Size);

and it will be better if you don't use quotes outside or use double quotes (should work with set if I am not wrong)

 

View solution in original post

1 Reply
asinha1991
Creator III
Creator III

I see a possible issue

SET eRSFF = sum({<City-={'Beijing', 'Shanghai', 'Taipei'}>}Size);

and it will be better if you don't use quotes outside or use double quotes (should work with set if I am not wrong)