I know there is a feature in Tableau that i can filter top N. But i would like to filter top N data from a custom SQL. Is there any way?
For example from below table, I would like to write a query to extract only top 3 (id = 5, 1 and 16)
I assume that you are not referring to custom SQL as related to data sources.
As far as I know, there is no way to write SQL-like scripts on Tableau views.
But what is wrong with using top-N filter?