5 Replies Latest reply on Mar 21, 2017 1:14 PM by Sirish Bhatta

# Sum of Top 10 - Another total

Tableau 10

Hello,

how you i go about capturing the total of TOP 10 values and then subtract it from another total. I think i need to use a calculated filed?

• ###### 1. Re: Sum of Top 10 - Another total

Rank calc:

RANK(sum(whatever-you-are-ranking))

Sum of Top-10 calc:

window_sum( IF [Rank Calc] <= 10 then sum(whatever-you-are-ranking) END )

Then you can use [Sum of top-10 calc] where you need to subtract it from something else.

2 of 2 people found this helpful
• ###### 2. Re: Sum of Top 10 - Another total

Hi Sirish,

See the Screenshot and attached.

• Calculate SUM(Sales)for Top 10.
• Keep it in the view
• Create a FIXED Calc for Overall Sales SUM

• Then Subtract your Top 10 Sales from FIXED LOD (Calculation1)
• To do this, just drag them from your view into the new Calculation2  and do substraction and That's It.

Hope it Helps!!!

Let me know.

Thanks

Deepak

• ###### 3. Re: Sum of Top 10 - Another total

Thanks Deepak. Cannot use lod as I am using excel SQL. Thanks

Sirish

• ###### 4. Re: Sum of Top 10 - Another total

Then you can use TOTAL(SUM(SALES)) instead of LOD

• ###### 5. Re: Sum of Top 10 - Another total

I also have a month dimension. Month 1 month 2.. Dynamic month

Sirish