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
teatree
Frequent Visitor

Duplicating Map Legend

Hi,

 

My map seems to be duplicating each point on the map when both of my legends are selected.

 

So, I'm placing a pointer on a map to say that one is a client and the other is not a client. When I slice the data by Is Client/Is Not Client, the data shows correctly. But when I select both, rather than the map showing both points in different colours, it is duplicating each instance and splitting the colours in half to say that one instance is both a client and is not?

 

hQpBirj

 

 

 

But when I select one or the other, they show correctly and don't duplicate. I've placed the same location when selecting is not client and is client and you will see that they show correctly.

 

uWVNh9Z

 

PaIgv2t

 

But now when I select both IS and ISN'T the duplicates happen again:

 

fus1t2j

 

 

Does anyone know why this is? There are no duplicate instances in the data, hence they are showing correctly when one or the other is selected, just not both.

 

Would appreciate any help! 🙂

 

Francesca

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

You are welcome! Smiley Happy

One more thing you may consider is concatenating columns into a new column solely for Tooltip Use.

So first create a Column by concatenating the information you want to show in the Tooltip and then use this new column in a Measure!

Hope this helps! Smiley Happy

 

2016-10-28 - Map Labels4.png

View solution in original post

14 REPLIES 14
Sean
Community Champion
Community Champion

@teatree This is most likely because you've left the Size field empty.

You need to Leave the Location field blank

Legend - Client/Is not Client column

Lat - Latitude (Do Not Sum) with this set up

Long - Longitude (Do Not Sum) with this set up

Size - If you want them all to be the same size just drag the Client/Is Not Client column to create a Count of...

I think this should do it! Smiley Happy

teatree
Frequent Visitor

Hi Sean,

 

I have additional data in the location field such as the Establishments Name and the Customer Code so that they show when hovering over,  that way I can see that a) the circle is green so they are a client, and b) what the clients customer reference is.

 

 

In response to the measure, I'm not too sure I understand what you mean as I can't use the measure as a legend, unless I'm misunderstanding?

 

Sean
Community Champion
Community Champion

@teatree

So what happens when you drag the Client column to the Size field? I think it should work with your setup too!

teatree
Frequent Visitor

My client column has both Yes/No

 

Are you saying it would be better if these were split into separate columns? Because by doing what you have said, everything is the same colour and everything in that client column shows up as 1, whether it says yes or no

 

Thanks for your help by the way:)

Sean
Community Champion
Community Champion

@teatree Okay you still need to drag Client to the size!

However the issue I think is happening and/or will happen inevitably at different levels when you do the drill down.

It will definitely happen when you are on the county level.

EDIT: Because you are plotting 1 County (1 Location) that has both Customers and Not Customers.

So the drill-down will work but only on the levels where each point you plot can be only either Customer or Not Customer.

If it can be both you'll get your original result.

There are many ways you can go about resolving this.

1) Use several maps - each at a different level. So we you click a County on one the other will zoom in on the zipcode

2) Plot only zipcodes and put all else in the tooltips (you'll need measures to do this) and use Slicers to navigate the Map

 

2016-10-28 - Map Labels.png

 

2016-10-28 - Map Labels2.png

Hope this helps! Smiley Happy

 

Let me know if you have any questions.

teatree
Frequent Visitor

Sure, here it is

 

 

knssSrx

Hi @teatree,

Agree with Sean. Tooltips in Power BI Desktop are an effective way of providing more contextual information and detail to data points on a visual, please drag countrymeasure and EstablishMeasure into Tooltips of Map visual  according to Sean’s reply. I make a test using your sample data, for more details, you can review the attached PBIX file.

CountryMeasure = VALUES(Table1[Country ])
EstablishMeasure = VALUES(Table1[Establishment Name])

1.PNG

Moreover, with the slicers in the above screenshot, you are able to filter your map based on needs.

Thanks,
Lydia Zhang



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

Hi Lydia,

 

Your map is exactly what I'm looking to do. I've downloaded the file and have had a look at it but when I try to apply to my data, I get an error:

 

MdxScript(Model) (1, 43) Calculation error in measure 'Table1[EstablishmentNameMeasure]: A table of multiple values was supplied where a single value was expected.

 

I completely understand what you are doing and it is what I need to apply to my data. 

 

Do you know what I'm doing wrong?

 

I assume this is because from the data clip that you used, every value was unique. 

 

I have several county's/postcode's which are the same.. 

 

So an establishment can be in the same location as another but will have a different name. I'm mainly using this for schools so for example:

 

The postcode: M29 8BS has 4+ records assigned against it:

 

Establishment Name

Postcode

County

Client

Customer Code

Establishment Type

Establishment Phase

Cambian 110 Peelhouse

 M29 8BS

Manchester

Yes

CAM01

Other Independent

Secondary

Cambian Meadow Road

 M29 8BS

Manchester

No

 

Other Independent

Primary

Cambian Tyldesley School

 M29 8BS

Manchester

No

 

Other Independent

Secondary

Cambian Willoughby School

 M29 8BS

Manchester

Yes

CAM02

Other Independent

Primary

 

I'm assuming this is why I'm getting the error when placing the measure in tooltips? 

 

Francesca

Sean
Community Champion
Community Champion

@teatree Did you try the Measure (underlined in red) in the first picture (top left corner) from my Last Resposne?

 

Establishments = CONCATENATEX ( VALUES('TableName'[Establishment Name]), 'TableName'[Establishment Name],", ")

 

2016-10-28 - Map Labels3.png 

teatree
Frequent Visitor

Hi Sean,

 

 

Sorry, I missed your post! This seems to actually be working v well for me. Let me keep playing with it and make sure that this is indeed what I need. Thank you so much 🙂

 

Francesca

Sean
Community Champion
Community Champion

You are welcome! Smiley Happy

One more thing you may consider is concatenating columns into a new column solely for Tooltip Use.

So first create a Column by concatenating the information you want to show in the Tooltip and then use this new column in a Measure!

Hope this helps! Smiley Happy

 

2016-10-28 - Map Labels4.png

teatree
Frequent Visitor

Sean! Thank you ever so much, I would be so lost without you Cat LOL

 

This has worked for me!!

 

Thank you again!

Francesca

BhaveshPatel
Community Champion
Community Champion

Try writing a measure with CALCULATE  to filter out the Client Instance with Isn't Client instance. and use that measure on your map

 

Something like this..

 

Measure:=CALCULATE(COUNT(INSTANCE),FILTER(TABLE,TABLE[INSTANCENAME]="CLIENT")

 

and see how it goes..

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

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.