Forum Discussion
Filtering with map visual
Hi,
please can anyone help me?
I need to filter a top 5 rank chart bar by using a map visual (Brazil - States).
My model is simple, it contains:
- a databse with 5 columns: Brazil state, Product code and ammount sold
- Visual map
- Bar chart with a top 5 filter by ammount sold
The issue is that by clicking on a map region, the bar chart dont change the top 5 products, it only highliths the ammount sold that the sell=ected region contains of the products that is already on the chart.
Thank you
Riad
- You should be able to do this using "Edit Interactions" and set the bar chart to filter.
5 Replies
- AllisonKennedyCommunity ChampionYou should be able to do this using "Edit Interactions" and set the bar chart to filter.
- riadorraHelper II
Hi,
i´m sorry, maybe i didn't explain the isse rigth. I'll try to give you an example ...
What is happening is when there is no area selected on the map, the top five produts shows on the bar chart are:
1 - Strawberry (200 produtcs sold)
2- Mango (98 products sold)
3 - Pineaple (70 products sold)
4 - Banana (60 products sold)
5 - apple (50 products sold)
By clicking at Sao Paulo on the map, the bar chart only highlights / change the ammount of the products sold. What i need is that by clicking on Sao Paulo, for example, the chart shows the top 5 products in Sao Paulo, and as a result the chart should shows:
1 - Strawberry (80)
2 - Pienaple (60)
3 - Orange (35)
4 - Apple (30)
5 - Grape (10)
Thank you
Riad
- Greg_DecklerCommunity Champion
riadorra - AllisonKennedy was correct, you need to change the filter behavior to Filter instead of Highlight:
- amitchandakSuper User
riadorra , Not very clear to me .
You can top 5 product sold like
rankx(all(Table[product]) calculate(Sum(table[ammount sold ])))
You can visual level filter of bar visual
or you can use TOP N
https://blog.gbrueckl.at/2019/05/power-bi-dynamic-topn-others-with-drill-down/
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415