Forum Discussion
Map not affected by slicer
- Anonymous7 years ago
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
The quickest way to address it would be to set the filter direction to both:
However, 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?
- Anonymous7 years agoNot 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
- rvcedd7 years ago
Helper I
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.
- Anonymous7 years agoNot 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.