8 Replies Latest reply on Jun 22, 2018 12:48 PM by Jim Dehner

# Trouble filtering Top X maps and nothing works :(

I'm new to Tableau and have been stuck with this matter for quite a while. It would be great if someone can give me ideas on what to do or a work around on this. Because of confidentially issue, I can't provide the workbook but I'll explain the data that I have, what I need to do about it, and also the workaround that I've been doing. Any insights would be greatly appreciated!!

Data and overview:

I have customers data and where they buy Product A and Product B in several of our stores across the United States. I wanted to visualize the top X stores in maps where each customers buy the products accordingly. I have the store unit ID, latitude and longitude data of each stores.

Problem:

I tried to do this using parameter Top X and use a calculated field to filter it. It worked fine across table calculation. However, if I try to do it in maps, it doesn't filter out according to the Top X parameter. I put longitude and latitude of the store in the columns and rows. Sum of Sales, Store unit ID in marks. Filter by salesperson, product type, customer name, and calculated field to filter in Top X or not.

Workaround that I've been doing:

1. Create a LOD calculation  as follows: Fixed ( [Customer], [Store Unit ID], [Product Type], [Transaction Date] : SUM [Sales]) and put this in the maps instead of just sum sales. It doesn't work.

2. Create a set by formula and use LOD calculation above.

3. I've been trying the solution from here too:

Get map to always show top N entries with filters on

Dashboard trouble filtering a map by a Top (N) filtered vertical bar sheet

Any workaround or maybe why this might keep happening would be greatly appreciated. Thank you so much!! Let me know if you need further explanation

Message was edited by: Cynthia Amelia

• ###### 1. Re: Trouble filtering Top X maps and nothing works :(

add your filters to CONTEXT as you are using FIXED LOD

• ###### 2. Re: Trouble filtering Top X maps and nothing works :(

Hi Deepak,

Can you elaborate more on how to do that and why? Thanks so much!!

• ###### 3. Re: Trouble filtering Top X maps and nothing works :(

Fixed Calcs are Higher Order Calcs,but Can be only FILTERED by CONTEXT filters. Whatever You have on Filter Shelf, Right Click and add that to context from menu

• ###### 4. Re: Trouble filtering Top X maps and nothing works :(

I tried and did that but it doesn't seem to do anything. It still shows all the stores and not the Top X stores. Any ideas what to do then?

• ###### 5. Re: Trouble filtering Top X maps and nothing works :(

can you create a dummy workbook with superstore data?

• ###### 6. Re: Trouble filtering Top X maps and nothing works :(

Hi I created the dummy data of the data that I have and also the work I did so far in tableau workbook as attached. Thank you!Trouble filtering Top X maps and nothing works :(

• ###### 7. Re: Trouble filtering Top X maps and nothing works :(

Hey I figured it out, the rank should be calculated along the store unit ID, store lat, and store long instead across the table. Thanks so much for the help!!!

• ###### 8. Re: Trouble filtering Top X maps and nothing works :(

Hi

see the attached

made some changes and in combination they return this

computed at Store ID

converted to rank unique

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.