7 Replies Latest reply on Aug 24, 2018 4:36 AM by SUMIT Goyal

# Top And Bottom Values

Hi All,

I am very much new to tableau and facing some problems while computing top and bottom values.

So i need to calculate top and bottom values for a calculated field,that too location Wise.

I have my location,Names of customers on Rows Shelf and calculated field on the column shelf,

giving me value of all the names, location wise.

Now i need to get the top N and bottom N(Names) according to the calculated field from this data.

TIA

Raghav

• ###### 1. Re: Top And Bottom Values

Hi Raghav,

There are Multiple Threads on This, and Welcome to Tableau. I would suggest this to follow:

Thanks

Deepak

• ###### 2. Re: Top And Bottom Values

Hi Raghav

Try this way if you only want top or bottom value in the same viz

Right click 'customer name' -- filter -- top--- by field

Regards

YT

• ###### 3. Re: Top And Bottom Values

Hi Tian,

I want Top N And Bottom N both on the same worksheet.

TIA

Raghav

• ###### 4. Re: Top And Bottom Values

hi Raghav

see attach file i provide 4 methods to get top&bottom in the same sheet.

regards

YT

1 of 1 people found this helpful
• ###### 5. Re: Top And Bottom Values

Hi Raghav,

Create calculation

if index()<=[TOP/Bottom N] then 'Top N'

elseif index()>=size() - [TOP/Bottom N] then 'Bottom N'

else 'Others'

end

Drag dimension into row.

drag this calc into filter and select topN and bottom n.

Sort the values too.

You can get both in single sheet.

Thanks

sankar

• ###### 6. Re: Top And Bottom Values

Hi @RAGHAV MEHTA,

You can achieve this by using sets and combined set. Please follow the below screen shot and Tableau Public Link.

https://public.tableau.com/profile/siva.nageswara.rao.yenikepalli#!/vizhome/TOPNandBottomN_0/UsingCalculatedField