5 Replies Latest reply on Dec 11, 2013 3:04 AM by Jyothsana PJ

# I want to display the % of top 5 items of the total of all items (including other than top N) shown in a view

Hi Team,

I am trying to calculate the % share of top 5 items in a view. The total however is a sum of all items (including the top 5 in the view).

In the attached dashboard, you will see that there are 4 weeks for which the top 5 companies data is being shown and there is a Total row. Now, i need to calculate the % share of these top 5 Companies out of the Total for each week and not for each company.

I urgently need help in achieving this.

• ###### 1. Re: I want to display the % of top 5 items of the total of all items (including other than top N) shown in a view

I do not believe that you can put the % of total in columns without going into a complex process,

If it was just one column, Tableau would put it in a separate column

I have put the % of total under, does this work for you?

1.you need to change the sum duration to % of total

2.you need to add the pile duration in the measure values

3.you need to move it up

4.you can change the format to show no decimals

Cheers

• ###### 2. Re: I want to display the % of top 5 items of the total of all items (including other than top N) shown in a view

Thanks for the response. However it doesn't still address my requirement. I do not want a % for each row, but I need for the total of the Top 5 rows. i.e Sum(Top 5 Companies)/Sum(All Companies) for each column

• ###### 3. Re: I want to display the % of top 5 items of the total of all items (including other than top N) shown in a view

Hello Jyothsana

I'm not a very experienced Tableau user but does this help?

Best wishes

Juliette

• ###### 4. Re: I want to display the % of top 5 items of the total of all items (including other than top N) shown in a view

Hi Juliette,

Thanks a lot. This is exactly what I was looking for!

• ###### 5. Re: I want to display the % of top 5 items of the total of all items (including other than top N) shown in a view

Sorting in Descending order

Hello everyone,

I have one more query. The advertisers has to be sorted in descending order for each channel by the latest week available in data and select only top 5 advertisers for the latest week and corresponding data from previous 3 weeks.

This activity should be repeated for many channels on a weekly basis. i.e. Sorting in descending order by latest week should happen dynamically.

Every time, when a new week of data is added, the advertisers should automatically get sorted in descending order of the latest week of data and display corresponding data from the previous weeks.