Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to create a pie chart which only contains the top 5 countries by sales.
A similar problem was discussed here: Selecting 200 entries from a bar chart to make a filter
@jpe uploaded an example file in that very thread: http://community.qlik.com/servlet/JiveServlet/download/659913-138096/Lunch%20and%20Learn.qvf
However, when I ran the example, the bottom pie chart is not displayed.
The message reads "Cannot display graph because it contains only negative or NULL values".
I tried on a different platform with English UI, same error.
Using QliKSense 1.1.
Thanks for your help!
If your 3rd measure was something like ' Count(CustomerID),
then you change your dimension to a calculated expression
In the following example, my dimension for the scatter is country. If i change the dimension expression from Country to the following:
if( aggr(rank( total Count(CustomerID)),Country) <=5 , Country)
...and then uncheck 'show nulls' , it will only show the 5 countries with the most customers
See below for the scatter chart showing the 5 countries with most customers (bubble size) and the full list on the left.
There is actually an easier way in 1.1
See below screenshot showing 'Top x' properties on right side.
Hi Jonathan,
thanks for your quick reply!
Unfortunately, I need the same for a scatter plot where the "Top" option is not available.
Any ideas?
hmm.. there is that option on a scatter plot. Its done on the dimension and pertains to the 1st measure.
Would that work ?
worked, thank you!
Hi Jonathan,
just realised it only works for the first of the three dimensions. A filter for the top 1000 entries for, let's say' the third (bubble size) dimension is not possible.
Could you think of a workaround?
If your 3rd measure was something like ' Count(CustomerID),
then you change your dimension to a calculated expression
In the following example, my dimension for the scatter is country. If i change the dimension expression from Country to the following:
if( aggr(rank( total Count(CustomerID)),Country) <=5 , Country)
...and then uncheck 'show nulls' , it will only show the 5 countries with the most customers
See below for the scatter chart showing the 5 countries with most customers (bubble size) and the full list on the left.
that's the one! Thank you very much!
Didn't think of manipulating the dimension rather than the measures. Now it seems rather obvious