4 Replies Latest reply: Dec 22, 2016 4:41 PM by Cynthia McLauchlan

# Bar chart legend showing more than limited dimension values

I've used the option to restrict the number of dimension values shown in a bar chart to be the top 10. However, the legend still depicts all values, resulting in a very long and confusing legend. Since there are a lot of colour overlaps, it's also very difficult to find what the 10 values displayed in the bar chart correspond to.

I would like to have my bar chart show the Top 10 dimension values based on my measure (currently doing so), and then have the legend only show these top 10 dimension values.

Amendment: when using two dimensions (say date and medium), limiting the second dimension appears to result in a Top 10 medium for EACH date. The question is therefore how to limit medium to the Top 10 overall, without aggregating by the first dimension.

• ###### Re: Bar chart legend showing more than limited dimension values

hi

how did you limit the number of enitties

because i just tried it and my legend displays just the 10 entities in the dimension

• ###### Re: Bar chart legend showing more than limited dimension values

Hi Liron,

In the dimension field, I have a date and a second dimension (medium in this case). I'm limiting the second dimension to the Top 10 using "Limitation > Fix Number > Top > 10". In second thought, my guess is that it's limiting each date to the top 10 mediums, resulting in more than 10 mediums over all dates.

So I'll revise the question: how can I limit the mediums to the Top 10 overall, regardless of the first dimension?

• ###### Re: Bar chart legend showing more than limited dimension values

hi

this example should do the trick for you

you need to create calculated dimension

=aggr(if(rank(sum([Sales Amount]))<=10,medium),[medium])

do not forget to suppress null values in this dimension

• ###### Re: Bar chart legend showing more than limited dimension values

Thanks! This method works when limiting on the dimension. It creates the top 10 mediums, and then assigns the Sales Amount for all other mediums to a null set. The totals are therefore maintained.