5 Replies Latest reply on Oct 27, 2017 1:02 PM by Alfredo Hermosillo

# Total Top n as a percent of Total

I need to get the total of the Top 5 cities (by sales) as a percent of the total sales.

I've illustrated my question using the Superstore data.

I can see top 5 cities, by sales and then by percent of total sales:

And I can get the total of the top 5 cities by the sum(sales) and the top 5 filter on City, equals \$773,506

I can also get the total sales data by just grabbing total sales, equals \$2,297,201

But now I need to get the percent of the top 5 sales by total sales or 33.67% and show it in the dashboard like this:

I've attached the workbook, which was created in v9.1.

Any input on how you can show a Top n Total value as a percent of the Total Value?

Thank you.

• ###### 1. Re: Total Top n as a percent of Total

Hi Spencer,

You can create your own percent of total using LOD it should give the grand percent of total you are looking for.

Regards,

Ivan

SUM([Sales])/SUM({ FIXED : SUM([Sales]) })

1 of 1 people found this helpful
• ###### 2. Re: Total Top n as a percent of Total

Hi Ivan,

Thanks for the response.  I've actually tried that LOD calculation that you shared but the problem is that I am filtering by the Top 5 Cities by Sales.  Since I am using a Top n Filter (using index()) I do not get a Grand Total.  Therefore, when I apply the LOD calculation, I just get the total sales number.  But what I need is the Total Sales Number by Top 5 Cities / Divided by the Total of all Sales.

Thanks,  Spencer

• ###### 3. Re: Total Top n as a percent of Total

...Actually...the LOD calculation did work.  I just had to combine it with my Top 5 Filter.

Thank you Ivan.  I now have what I need.

Thanks for the response.

Spencer

• ###### 4. Re: Total Top n as a percent of Total

Hi Spencer,

Can you upload the workbook in which you added the LOD to the TOP N.

I am not able to get it done.

Thanks

• ###### 5. Re: Total Top n as a percent of Total

Hi

There are most than one solution, but i have this, i hope that ben what you find.

attach workbook with the solution.