5 Replies Latest reply on Oct 3, 2016 7:35 AM by Shinichiro Murakami

# Filtering for Top and Top N by Region

With reference to the workbook attached, tab "Top N", the graph will show top N products based on user's N input. Now if region is added into the equation, how can I make it show top N for the selected region based on user's N input.

• ###### 1. Re: Filtering for Top and Top N by Region

Add "Region"Field in Filter Shelf and change it to "Context".

Thanks,

Shin

• ###### 2. Re: Filtering for Top and Top N by Region

A couple questions:

1. What is your idea to show what % of the total business the top N (integer) products make up of?

2. How can the user enter top N instead of integer, but %?

• ###### 3. Re: Filtering for Top and Top N by Region

1. ==> see sheet Top N

[TopN % sales]

sum(if [Top N]<>0  then [Sales] END)/attr({fixed:sum([Sales])})

2.  ==> see sheet Top N %

[TOP% filter]

RUNNING_SUM(sum({include[Product ID]:sum([Sales])}/{fixed:sum([Sales])}))<=[TOP N %]

Thanks,

Shin

9.2 attached.

1 of 1 people found this helpful
• ###### 4. Re: Filtering for Top and Top N by Region

Thanks for all the responses, have tried all the methods above and none of them seem to be working in the way I would like them to, context still gives me the problem of not separating the top N into categories first.

I have watched this video and tried this method but the step where you change the rank via the "advanced" setting doesn't seem to come up on the latest version of tableau - if anyone could help me out there that would be really helpful!

• ###### 5. Re: Filtering for Top and Top N by Region

Could you attach non-working packaged workbook?

Thanks,

Shin