Here's a general solution for Tableau. It required a view with the level of detail displaying the area of interest, some table calc's and parameters.
I think the better general case solution wold use RANK and PERCENTILES from the database. However, with local data sources, this option isn't possible!
This link is a Zip file that contains a Tableau Packaged Workbook illustrating how you can do this: Stephen_McDaniel_Find_the_Values_Near_the_Max.