Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kandimal
Contributor II
Contributor II

Qliksense Map - Top 10 Country's with highest customers

Hi All,

I'm trying to show top 10 country's with highest customers using native map function in qliksense.

 

from the image, i only want to show the top 10 bubble and the rest should not be shown. I had used the function 

=count({<Nationality = {"=Rank(count(distinct CUSTOMER_ID))<=10"}>} CUSTOMER_ID) but not able to get the desired result. Could some one help with this?

 

Kandimal_0-1595515756691.png

 

Labels (2)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi 

try to replicate this app 

 

View solution in original post

8 Replies
lironbaram
Partner - Master III
Partner - Master III

HI 

use this expression in your dimension 

aggr(if(rank(count(distinct CUSTOMER_ID)<=10,Nationality ),Nationality ) 

and this for size expression 

count(distinct CUSTOMER_ID)

Kandimal
Contributor II
Contributor II
Author

@lironbaram 

thanks for the reply and suggested expression still gives me the same result.

the main problem was due to the dimension property value "Limitation" disable for Nationality column. otherwise would have used Fixed and written the expression in global variable and would have called it under "TOP".

Is there something we could do from Scripting side? like creating a new column to hold some sort of value and calling it in the main report?

 
 
 
 
 
 
 
 
lironbaram
Partner - Master III
Partner - Master III

Hi

this expression work perfectly on my app 

can you share a sample app 

 

Kandimal
Contributor II
Contributor II
Author

i'm using native map from qlik and using a dimension which contains the country code like - US,UK,IN...etc...(many countries we have in my dimension and in my first shared image )

when I apply the above expression in dimension the pointers/area bubbles in my map get disappear.

I couldn't able to share the sample app due to data policies in my org...also i noticed, the default option we get to limit the dimension value(fixed/limited/range) is also disabled. does it happens with  by default qlik application?

lironbaram
Partner - Master III
Partner - Master III

hi 

the dimensions in the map doesn't have this option 

just to make sure you did replace the expression in the demo with the expression and fields from your app?

Kandimal
Contributor II
Contributor II
Author

yes, I have replaced it with my actual dimension name in the given expression. since aggr function takes 2 arguments, i have to add "," and ")" at the end to make the syntax work.

aggr(if(rank(count(distinct CUST_ID_NUM)<=10,Nationality ),Nationality ),)

Could you please share your map image or sample app where it's working for you?

lironbaram
Partner - Master III
Partner - Master III

hi 

try to replicate this app 

 

Kandimal
Contributor II
Contributor II
Author

Hi,

Actually I was looking for even better solution since I want only to show TOP 10 values (static always) and found we can actually limit by setting the MAX value to 10 under general property under the created layer.

The dynamic solution you have provided is also a good one when especially user wants to play around the map using a slider object

Thank you