cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
StuartSmith Regular Visitor
Regular Visitor

Auto-select/Display Map Bubble Value in card when only one bubble on map.

I have a map that shows various data bubbles and if a bubble is selected, the data for the bubble is shown in a card. Is there a way that if the map is zoomed is so that there is only one data bubble showing, it is auto selected and the card value auto-populated as if the user had selected the bubble with the mouse?

 

1 ACCEPTED SOLUTION

Accepted Solutions
StuartSmith Regular Visitor
Regular Visitor

Re: Auto-select/Display Map Bubble Value in card when only one bubble on map.

I believe I may have found a way.  I created an IF Count measure for the address table to see if the count was 1, anything other than 1 would not populate the cards, but if the address table was 1, the cards were populated.  Seems to work, but need to test.

 

Here is the code, and checks various on slices and will only populate cards if a single value is selected.  Might not be the most efficient code, but it seems to meet my needs of only ever populating the cards if the address table has 1 row.

 

HRBusinessPartner.Title_Measure = IF(ISFILTERED('Location Overview'[Address]) && HASONEVALUE('Location Overview'[Address]) || ISFILTERED('Location Overview'[Country]) && HASONEVALUE('Location Overview'[Country]) || ISFILTERED('Location Overview'[City]) && HASONEVALUE('Location Overview'[City]) || ISFILTERED('Location Overview'[Building Code]) && HASONEVALUE('Location Overview'[Building Code]), IF(COUNT('Location Overview'[Address]) =1, LASTNONBLANK('Location Overview'[HRBusinessPartner.Title],""), ""), "")
2 REPLIES 2
Community Support Team
Community Support Team

Re: Auto-select/Display Map Bubble Value in card when only one bubble on map.

hi, @StuartSmith

After my research, I'm afraid it couldn't achieve in Power BI for now.

For your requirement, you could post your new idea in Power BI ideas and make this feature coming sooner.

 

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
StuartSmith Regular Visitor
Regular Visitor

Re: Auto-select/Display Map Bubble Value in card when only one bubble on map.

I believe I may have found a way.  I created an IF Count measure for the address table to see if the count was 1, anything other than 1 would not populate the cards, but if the address table was 1, the cards were populated.  Seems to work, but need to test.

 

Here is the code, and checks various on slices and will only populate cards if a single value is selected.  Might not be the most efficient code, but it seems to meet my needs of only ever populating the cards if the address table has 1 row.

 

HRBusinessPartner.Title_Measure = IF(ISFILTERED('Location Overview'[Address]) && HASONEVALUE('Location Overview'[Address]) || ISFILTERED('Location Overview'[Country]) && HASONEVALUE('Location Overview'[Country]) || ISFILTERED('Location Overview'[City]) && HASONEVALUE('Location Overview'[City]) || ISFILTERED('Location Overview'[Building Code]) && HASONEVALUE('Location Overview'[Building Code]), IF(COUNT('Location Overview'[Address]) =1, LASTNONBLANK('Location Overview'[HRBusinessPartner.Title],""), ""), "")