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

Shape file legend help

Hello,

 

Having difficulty with creating a legend for a custom shape file. 

 

I have added a shape file visual, and added the custom TopoJSON which links to location data imported as a CSV. This data has a list of regions and then the type of region (4 different region types) e.g.:

 

Region; Region Type

A; Type 1

B; Type 1

C; Type 2

D ;Type 3

etc

 

Before adding a legend, the map seems to function fine. I can add region type to the tooltip and as I hover over the map I can see that is correctly identifying the region type. Additionally in the filter I can see that it has the correct sum of each region type.

 

When I add Region Type to the legend, every region is instead just coloured determined by the alphabetically first Region Type. So say when there is no filter and Types 1,2,3, & 4 - every region is coloured as Type 1. If I untick Type 1 - all those that are type 1 go blank (correctly), but now all the remaining regions are instead colours as Type 2. 

 

It is almost as if for some reason, the alphabetically first type is dominant and 'on top'. Frustratingly cannot figure out why it is doing this. Any suggestions?

 

Thanks.

 

4 REPLIES 4
v-easonf-msft
Community Support
Community Support

Hi, @Jack251120 

Could you please tell me whether your problem has been solved?
For now, there is no content of description in the thread. If you still need help, please share more details to us. You also could share your own solution here if it was solved.

Best Regards,
Community Support Team _ Eason

 

Hello,

 

No I still have not found a solution, hopefully with the images below it will give a clearer understanding of the problem.

 

So for example below, all the different LA authorities are set to one of four categories. However the whole map is blue the colour of type 1:

 

Jack251120_0-1607419649654.png

 

If I add a filter and untick Type 1, the map looks like this:

 

Jack251120_1-1607419718696.png

 

As you can see some areas have gone grey. These are the areas that are Type 1. However now all the remainding areas (Types 2,3, & 4) are all coloured according to Type 2. I can do the same again and untick type 2, and more areas will go grey - but now the colour for type 3 is 'dominant' and covers up type 4. 

 

Jack251120_2-1607419804810.png

 

What's confusing is me is, from the filtering you can see it is correctly picking up what regions are which type (and if I look at the tooltip it is correcting showing).

 

Thanks for any help.

 

v-easonf-msft
Community Support
Community Support

Hello,

 

Could you please explain what further detail would be useful?

I have a table that of Local Authorities. This table includes the name of local authority, the local authority code (this links to the shape map file), and a region category (each local authority is one of 3 region categories). I want the shape map to show the local authories coloured by the region category.

I have the shape map which has the 'Location' as the Local Authority name. This appears to work fine, the map shows up and if I hover over any of the areas it has the correct name in the tooltip. 

 

If I then add the region category from the table to the shape map - 'Legend' I get the first image as per above. Every local authority is coloured blue and the tooltip says every region is the first region category by alphabetical order which is not correct.

 

Thanks, Jack. 

 

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.