Hi,
I have a bar chart which lists the top 10 destinations in descending order. The chat title is "Top 10 Destinations". If user selects the top 4 ( or any number of destinations) by selecting on the chart, i want to change the title to reflect the number of destinations selected. eg. Top 4 Destinations etc.
How can i get the number of destinations by taking user's selection on the chart?
=if(getselectedcount(Destinations)<10,'Top '&getselectedcount(Destinations)&' Destinations','Top 10 Destinations)
May be this?
='Top ' & Count(Destinations) & ' Destinations'
1780137d wrote:
Hi,
I have a bar chart which lists the top 10 destinations in descending order. The chat title is "Top 10 Destinations". If user selects the top 4 ( or any number of destinations) by selecting on the chart, i want to change the title to reflect the number of destinations selected. eg. Top 4 Destinations etc.
How can i get the number of destinations by taking user's selection on the chart?
To elaborate further...
When the group of Top 4 destinations is selected ( by circling the bars in the chart), title becomes
Or maybe limit the upper boundary (because it is highly probable that the Dimension Limits tab has been activated or set analysis reduces the max number of dimension values):
='Top ' & RangeMin(Count(DISTINCT Destinations), 10) & ' Destinations'
Hi Daniel,
Thanks for the tip. It works for me with the getselectedcount()
my original solution was slightly wrong as if no selections were made then it would say Top 0 destinations.
I have fixed this now
=if(getselectedcount(destination)=0,'Top 10 Destinations',
if(getselectedcount(destination)<10,'Top '&getselectedcount(destination)&' Destinations','Top 10 Destinations'))
I've just tested and based on what you are asking for this works fine
Hi Daniel,
Thanks for the quality check. It's working well with your suggestion.
KP
Hi Peter,
Thank you for the neat solution. learnt something today.