Top 10 by a dimension does not take into account any filters that are not applied as context filters.
Thanks but I din't understand your answer.
There are no other filters applied in the work sheet
As I understand it, when i filter the 'app' by sum of revenue, it needs to take all rows in the data source that are under the same 'app' value and sum them - then take the top 10 of that
when i change from top 10 to top 20 , the relevant 'app' suddenly appear
but its obviously not (so how can I see what its calculating in the background?)
I cant seem to replicate your issue,could you provide with a sample workbook?
Also you can try using index() to filter out the view to top 10.
Thanks, I actually tried it, and when using the index condition for <=10, it does work when I use the data not split to categories (a column dimension), which is a breakdown of the total revenue
but when i added it, the index condition did not help anymore
I have a dimension as rows (a unique revenue category) and columns (an item sold) and I need the index to be according to the row 'grand total' which is equivalent to what i tried doing by using 'by field' sum(revenue) for each item sold
Index() will work you need to change your compute using. Since I dont know how many dimentions are in your workbook(seriously provide a sample workbook).
Supposing you have D1 across D2.
Go to advanced and bring all the dimentions you need(D1->D2 ,order is important).Then use restart at every to - D1 to get the correct filter result.
Im sorry but i cant provide a work book due to the data involved
i used 'compute using' , selected app when the values are broke down to a column dimension, it works
but when i add 'Analysis' -> 'Totals' -> row grand totals
only the column dimension data is filtered but the grand total is displaying for everything unfiltered again..
and i tried reapplying the 'compute using' at each stage within and after to see if it helps
I went ahead and mocked up what I think your viz is based on your description using superstore. I'm not able to reproduce your error with using the filter top n in the dimension.
Nofar it will help greatly to provide a packaged workbook to troubleshoot the problem you're experiencing. If you can't provide the actual workbook b/c of data sensitivity then you can anonymize it: Anonymize your Tableau Package Data for Sharing. Alternatively, you can mock up your viz using superstore data. Be sure to include any nuances (calc's, dimensions, measures, etc.)
Else, we will continue to go back and forth guessing what the issue might be.
Sort.twbx 389.0 KB