Are you using LOD? Or table calc?
Either one will do it for you.
But if you are doing a table calc, you'll have to mess with "Compute Using" to tell Tableau how to walk the table in the right order. If you have table-across, you'll get a different table calc value for each row. But table-down will grab the largest in the column instead of in the row. And if you have multiple dimensions in play, you may need to do something more than just table-down.
If you need detailed help with this, a packaged workbook is the way to let me help you with that.