KNOWLEDGE BASE

Filter Largest N Percent from Data


Published: 26 Aug 2020
Last Modified Date: 27 Aug 2020

Question

How to filter the largest N% of a measure field from the dataset. 

Environment

  • Tableau Desktop

Answer

1. Create a parameter called [!Largest N %] as a Float list.

 User-added image

2. Create a calculated field called [!Largest N Percent] that returns the n-th percentile value of the data.
    {PERCENTILE([Sales], [!Largest N %])}

3. Create a calculated field called [!Largest N Percent Filter] that filters out the Largest N percent.
    [Sales] >= [!Largest N Percent]

4. Drag [!Largest N Percent Filter] field to the Filters shelf, and select only 'True'.

See the attached video and workbook for details.

Did this article resolve the issue?