6 Replies Latest reply on May 4, 2017 9:49 AM by zhao.jin.1

    Getting topN results based on nested dimensions and using topN results with reversed hierarchy


      Hi everyone,


      I have a question on getting the top N results based on two nested dimensions and using the top N results in another worksheet that reverses the hierarchy of the dimensions.


      I am attaching a workbook to illustrate what I'd like to do using the superstore example. The workbook is made in Tableau 10.1.7.


      In the first worksheet, I got the top N (N = 3) sub-categories in a US state (eg., Arizona) based on profit. They are Machines, Accessories, and Phones.

      In the second worksheet, I'd like to keep the top 3 sub-categories I got from the first worksheet and see how these three sub-categories did in all states. I tried a few different ways. If I didn't include state as a filter or in the detail, the top 3 sub-categories became Accessories, Copiers, and Phones; however, if I included state, I wouldn't be able to get the profit in all states, because the states are filtered to only contain Arizona.


      Is there a way to get the top N sub-categories by profit within a state, then find out the profit for the exact same top N sub-categories in all states, not just the state where the sub-categories are from?


      Thanks for your comments/answers!