Last Modified Date: 08 Jan 2019
Environment
Tableau DesktopAnswer
The following instructions can be reviewed in the workbook attached below.Option 1
- Select Analysis > Create Calculated Field with a formula similar to the following:
INDEX() <= INT(SIZE()/5)
- Place the calculated field onto the Filters shelf and select True.
Note: Dividing by 5 will give the top 20 percent. This number can be adjusted to achieve the desired percentage.
Option 2
- Create a parameter Top N% as a float between 0 and 1, step size 0.01. Optionally, format the display format to 'Percentage'
- Create a calculated field 'Top N percent' that returns the n-th percentile value of the data set:
PERCENTILE([Sales],[Top N%])
- Create a calculated field 'Top N Filter' that filters out the Top N percent:
[Sales] <= [Top N Percent]
- Use the field 'Top N filter' on the Filters shelf, selecting only 'True'.
Additional Information
Discuss this article... Feedback Forum
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials