-
1. Re: Taking Top 'N' after all the Quick filters applied
Joshua Milligan Aug 5, 2016 8:17 AM (in response to Manu Mohan C)Manu,
This is probably the most effecient way to do it. You could also use either the Rank() or Index() functions and filter -- but that would be a late filter, so all the data has to be returned to Tableau first before the Rank or Index function is applied. It might not be as efficient, but if the number of aggregate rows is small, then it's a viable alternative.
What's the reason you wish to avoid using a context filter?
-Joshua
-
2. Re: Taking Top 'N' after all the Quick filters applied
Manu Mohan C Aug 5, 2016 8:20 AM (in response to Joshua Milligan)context filter reduces performance of workbook as it creates a temp table each time the filter changes
-
3. Re: Taking Top 'N' after all the Quick filters applied
Manu Mohan C Aug 5, 2016 8:35 AM (in response to Joshua Milligan)how can i achieve that using rank and index function when top 'N' selection is based on a parameter
-
4. Re: Taking Top 'N' after all the Quick filters applied
Joshua Milligan Aug 5, 2016 8:57 AM (in response to Manu Mohan C)Manu,
Context filters used to create temp tables, but I don't think this is any longer true with recent versions of Tableau. Nevertheless, they likely result in rather complex subquerries, which in some cases, may not be performant. You'll have to determine if it is more or less performant than returning all aggregate rows and then applying the Index() or Rank() function.
To do that, you'd create a calculation that compared the Rank to the parameter value, something like:
Rank(SUM([Field])) <= [Top N Parameter]
Place that on Filters, make sure to set the compute using (use the drop down menu on the field on Filters) to compute along all dimensions, and then keep where it is True.
Hope that helps!
Joshua
-
5. Re: Taking Top 'N' after all the Quick filters applied
Manu Mohan C Aug 5, 2016 9:09 AM (in response to Joshua Milligan)Thanks Joshua for your help ,
But the thing is in my filter shelf i have a total of 6 fields out of which 5 are dimensions and one is a measure . so if i add that rank field column to the filter shelf and filter using the measure field filter , would it take the top 'N' values of filtered data?