Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rvcedd
Helper I
Helper I

Map not affected by slicer

Hello there,

 

I have a very simple data model with 2 tables and a 1 to many relationships. One of the tables contains Lat/Long values - the other contains a grouping category based on the ID.

 

The issue is that selecting an item from the "Category" filter using ChicletSlicer or the built-in Slicer does not trigger an update of values in the map. (All of the values are still displayed). The strange thing is that by clicking on a location on the map, it filters the category so this means the relationship works.


Does anyone know what is going on? I have double checked the "Edit interactions sections" and everything is set to respond.

 

PowerBI Dashboard here: https://1drv.ms/u/s!Avv4DxzuMuq2kIFAh4B_rA3wx-bUqg?e=kK7b0V

 

Screenshots below:

From map to table.PNG

 

From table to map 2.PNG

 

From table to map 3.PNG

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

1. Create a new Calculated Table:

Category = DISTINCT('Grouping'[Category])

2. Create a new Calculated Column in your grouping table:

Category Count = 1

3. Add a relationship between the new Category table and the Grouping table.

4. Add the Category Count to the map (size?)

5. Change the Slicer to the new Category table.

Here is the pbix.

Cheers,

Nathan

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Hi, you are joining tables 'Grouping' and 'StopPoints_2018' based on the ID fields in both tables, however there are comparably few matches between the values in each of the ID fields. This might be the issue.

The number of matches should not affect the overall behaviour - this would be classed as a bug. Even if there was a single category in one of the tables and it only matched 1 entry in the other table this should still work. The fact that clicking on the map filters the category demonstrates that this is working.

 

In any case, I have updated the data model and only included a small subset of the data. The same behaviour exists.

 

Updated dashboard, same problem: https://1drv.ms/u/s!Avv4DxzuMuq2kIFBzqEVwHB2mn49mQ?e=HasYEo

Anonymous
Not applicable

The relationship between the 2 tables is such that the Grouping table does not filter the StopPoints table. You will need to modify that relationship.

Hope this helps,

Nathan

Hello Nathan - can you explain exactly what I need to modify? Currently the relationship is 1 to many - why is this not working and what is the correct solution?

Anonymous
Not applicable

The quickest way to address it would be to set the filter direction to both:

Cross Filter Direction.PNGHowever, that's not considered a best practice. Another possibility is to create a third table. Then, you'd have your new Category dimension table (a distinct list of Categories), your Location dimension table (stays the same), and then a "Factless Fact Table" (stays the same). Each dimension table would filter the fact table in a one-many relationship.

Hope this helps,

Nathan

Hi Natel. Many thanks for your reply - I would like to implement the second suggestion that you made but I am not sure I follow through exactly what you are suggesting.

 

Currently I have 2 tables and you are recommedning adding a 3rd one. Would you be able to help me understand the structure of the final data model? It would perhpas be easier to simply do in it in powerbi and then send the file over but if you prefer text then that could work.

 

So currently I have 2 tables:

StopPoints_2018 with ID, Lat and Long

Grouping with ID and Category

 

You are proposing adding a 3rd table? what values would be in that table? Can you give me a working example in Power BI?

 

 

Anonymous
Not applicable

1. Create a new Calculated Table:

Category = DISTINCT('Grouping'[Category])

2. Create a new Calculated Column in your grouping table:

Category Count = 1

3. Add a relationship between the new Category table and the Grouping table.

4. Add the Category Count to the map (size?)

5. Change the Slicer to the new Category table.

Here is the pbix.

Cheers,

Nathan

Ok - I see what you there - that helps a lot thank you so much. I still find it difficult to understand what is the reason behind having to add the Category Count to map - it seems counter intuitive and in no way helpful. I will mark the solution as an answer, thanks.

Anonymous
Not applicable

@rvcedd - The reason for the Category Count is to have a data point in the fact table. That is then used to filter to only the values that have data points. In other words, if there is no data in the fact table, the data point is excluded.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.