Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
alanwong1178
Contributor III
Contributor III

Scatter plot chart qliksense with dynamic dimension and top 10

 

Hi all,

I have data of example below, in this data we have Country and City with Sales and Profit

My idea is to build a scatter plot with Sales against Profit. I would like use a button to select either Country or city so that the dimension of scatter plot based on user selection. Also, because there are too many record, I would like to display either top 5 Countries based their sales or top 5 City based on their sales.

 

I have no idea how to write the rank formula to get top 5 countries or top 5 city based on their sales. Also, how to write the formula to make the dynamic switch between top 5 Countries based their sales or top 5 City based on their sales with the use of button/variables. (I guess if statement?)

 

Data like below 

 

x axis as sum(Sales) 

Y axis as sum(Profit)

CountryCitySalesProfit
USNYC37,733.28333.28
USLAX18,141.001041
USSFO1,814.1014.1
UKMAN5,830.0050
UKLON3,279.45379.45
ChinaSHA1,457.501357.5
ChinaPEK2,418.80218.8
JapanTYO18,141.0018041
JapanOSK245671432
1 Reply
JordyWegman
Partner
Partner

Hi Alan,

You should think a bit easier. For the dimension, just use an alternative dimension. This is a standard Qlik feature.

Example.png

 

For the top 5, just use the limitation function and set it to a fixed number. This is done based on the X-axis measure.

Example 2.png

Jordy

Climber

Work smarter, not harder