Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Ariel_1
Regular Visitor

Shape Map with Custom Legend

Hello,
I am a new user.  I want to develop the shape map with custom legend.  The legend is by range and kindly find the example of my idea below:

Table 1 (Sample)

Area1CountryItemCustomerAmountMore column....
A1AAFoodCus11000 
A3DDElectronicCus110000 
A2FFFoodCus25000 
A1BBElectronicCus23000 
A1AAFoodCus140000 
A1BBElectronicCus350000 
More information.....     

- Based on that I created two shape maps by range. 
- One is the Customer allocated by Country (maps range  eg. distinct count the customer and if the count is

1 - 5Red
5 - 6Green
6 - 10Yellow
Greate than 10Orange

-  The second is the amount allocated by country.

Less than 1K color
1 K - 10 Kcolor
10 K - 100Kcolor
100 K - 1000 Kcolor
Greater than 1000 Kcolor

 - I also created the customer range table and the amount range table to sort the legend.
- Slicer by Area (A1, A2,A3, etc), and other column visualization.
Problem
- Create the Range measure for the map and the measure cannot used in the legend.  So put the measure to fill color fx.
- Create the custom legend with table from the range legend table..
- How can I link with measure and range legend table.   And also the sumx values of amount and distinct count values of cust are dynamic based on the user selection of slicer or other visualization.

Please kindly help me to develop this one.



 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Ariel_1 - Legend wise visual colors change automatically conditional formatting will not work out but

I have created supporting tables for range of colors mentioned as below. we will use lookupvalue function as below

First create a calculated table with customerRange:

 

CustomerRange = DATATABLE(
"Range", STRING,
"Color", STRING,
{
{"1 - 5", "Red"},
{"5 - 6", "Green"},
{"6 - 10", "Yellow"},
{"Greater than 10", "Orange"}
}
)

 

create another calculated table with for amount

 

AmountRange = DATATABLE(
"Range", STRING,
"Color", STRING,
{
{"Less than 1K", "Color1"},
{"1K - 10K", "Color2"},
{"10K - 100K", "Color3"},
{"100K - 1000K", "Color4"},
{"Greater than 1000K", "Color5"}
}
)

 

Hope you already created total amount and count of customers measures at your end to pass the swith condition based on both metrics as below:

 

CustomerCountRange =
SWITCH(
TRUE(),
[CustomerCount] >= 1 && [CustomerCount] <= 5, "1 - 5",
[CustomerCount] > 5 && [CustomerCount] <= 6, "5 - 6",
[CustomerCount] > 6 && [CustomerCount] <= 10, "6 - 10",
[CustomerCount] > 10, "Greater than 10",
BLANK()
)

rajendraongole1_0-1718643532401.png

 

 

create another measure for amount range like customerRange

 

AmountRange =
SWITCH(
TRUE(),
[TotalAmount] < 1000, "Less than 1K",
[TotalAmount] >= 1000 && [TotalAmount] < 10000, "1K - 10K",
[TotalAmount] >= 10000 && [TotalAmount] < 100000, "10K - 100K",
[TotalAmount] >= 100000 && [TotalAmount] < 1000000, "100K - 1000K",
[TotalAmount] >= 1000000, "Greater than 1000K",
BLANK()
)

 

create a customer Count Color Measure and similar amount range measure

CustomerCountColor =
LOOKUPVALUE(CustomerRange[Color], CustomerRange[Range], [CustomerCountRange])

 

 

i have taken country with states names ,, pass the color 

rajendraongole1_2-1718643655322.png

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @Ariel_1 - Legend wise visual colors change automatically conditional formatting will not work out but

I have created supporting tables for range of colors mentioned as below. we will use lookupvalue function as below

First create a calculated table with customerRange:

 

CustomerRange = DATATABLE(
"Range", STRING,
"Color", STRING,
{
{"1 - 5", "Red"},
{"5 - 6", "Green"},
{"6 - 10", "Yellow"},
{"Greater than 10", "Orange"}
}
)

 

create another calculated table with for amount

 

AmountRange = DATATABLE(
"Range", STRING,
"Color", STRING,
{
{"Less than 1K", "Color1"},
{"1K - 10K", "Color2"},
{"10K - 100K", "Color3"},
{"100K - 1000K", "Color4"},
{"Greater than 1000K", "Color5"}
}
)

 

Hope you already created total amount and count of customers measures at your end to pass the swith condition based on both metrics as below:

 

CustomerCountRange =
SWITCH(
TRUE(),
[CustomerCount] >= 1 && [CustomerCount] <= 5, "1 - 5",
[CustomerCount] > 5 && [CustomerCount] <= 6, "5 - 6",
[CustomerCount] > 6 && [CustomerCount] <= 10, "6 - 10",
[CustomerCount] > 10, "Greater than 10",
BLANK()
)

rajendraongole1_0-1718643532401.png

 

 

create another measure for amount range like customerRange

 

AmountRange =
SWITCH(
TRUE(),
[TotalAmount] < 1000, "Less than 1K",
[TotalAmount] >= 1000 && [TotalAmount] < 10000, "1K - 10K",
[TotalAmount] >= 10000 && [TotalAmount] < 100000, "10K - 100K",
[TotalAmount] >= 100000 && [TotalAmount] < 1000000, "100K - 1000K",
[TotalAmount] >= 1000000, "Greater than 1000K",
BLANK()
)

 

create a customer Count Color Measure and similar amount range measure

CustomerCountColor =
LOOKUPVALUE(CustomerRange[Color], CustomerRange[Range], [CustomerCountRange])

 

 

i have taken country with states names ,, pass the color 

rajendraongole1_2-1718643655322.png

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors