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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
powerbiuser6
Frequent Visitor

How to apply a color gradient for percentage change values in a map visualization?

I am working on a report that includes a table displaying the percentage change in population for different neighborhoods between two periods. In my map visualization I have formatted the values so that negative percentage changes appear in red and positive percentage changes appear in green. However, since I am also displaying these values on a map, I would like to apply a color gradient to better reflect the magnitude of the changes. Specifically:

  • A larger negative percentage change (e.g., -82%) should appear in a darker shade of red, while a smaller negative change (e.g., -21%) should be in a lighter shade of red.
  • Similarly, a larger positive percentage change should be in a darker shade of green, while a smaller positive change should be in a lighter shade of green.

How can I implement this color gradient in Power BI so that the color intensity varies based on the magnitude of the percentage change while still maintaining red for negative values and green for positive values?

1 ACCEPTED SOLUTION
v-huijiey-msft
Community Support
Community Support

Hi @powerbiuser6 ,

 

Thanks for the reply from debblowers / Akash_Varuna .

 

To realize the gradient effect on the map, follow my steps.

 

Here's my example data, since I couldn't ensure that the community would be recognized by Azure Maps, I used US state names, just replace them with your own when you use them.

State

PopulationPeriod1

PopulationPeriod2

PopulationChange

California

50000000

500000

-99.00%

Texas

30000000

6000000

-80.00%

Florida

25000000

22500000

-10.00%

New York

20000000

25000000

25.00%

Pennsylvania

15000000

3000000

-80.00%

Illinois

12000000

1500000

-87.50%

Ohio

11000000

17050000

55.00%

Georgia

10000000

15000000

50.00%

North Carolina

10500000

5250000

-50.00%

Michigan

10000000

12500000

25.00%

 

Create an Azre map and drag the state field to Location.

 

Next Steps:

Turn off Bubble Layer > Turn on Filled Map > Colors > f(x)  > Format Style = Gradient > Base on [Sum of PopulationChange] > Adjust color, Min, Max

vhuijieymsft_0-1739430366127.png

vhuijieymsft_1-1739430366130.png

 

Result:

vhuijieymsft_2-1739430381553.png

 

The pbix file is attached.

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

4 REPLIES 4
v-huijiey-msft
Community Support
Community Support

Hi @powerbiuser6 ,

 

Thanks for the reply from debblowers / Akash_Varuna .

 

To realize the gradient effect on the map, follow my steps.

 

Here's my example data, since I couldn't ensure that the community would be recognized by Azure Maps, I used US state names, just replace them with your own when you use them.

State

PopulationPeriod1

PopulationPeriod2

PopulationChange

California

50000000

500000

-99.00%

Texas

30000000

6000000

-80.00%

Florida

25000000

22500000

-10.00%

New York

20000000

25000000

25.00%

Pennsylvania

15000000

3000000

-80.00%

Illinois

12000000

1500000

-87.50%

Ohio

11000000

17050000

55.00%

Georgia

10000000

15000000

50.00%

North Carolina

10500000

5250000

-50.00%

Michigan

10000000

12500000

25.00%

 

Create an Azre map and drag the state field to Location.

 

Next Steps:

Turn off Bubble Layer > Turn on Filled Map > Colors > f(x)  > Format Style = Gradient > Base on [Sum of PopulationChange] > Adjust color, Min, Max

vhuijieymsft_0-1739430366127.png

vhuijieymsft_1-1739430366130.png

 

Result:

vhuijieymsft_2-1739430381553.png

 

The pbix file is attached.

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Akash_Varuna
Resident Rockstar
Resident Rockstar

Hi @powerbiuser6 , 

  • Select Map Visualization: Go to the Format Visual pane → Data colors → Enable the fx conditional formatting option.
  • Set Gradient: Choose Color scale for "Format by" and set your Percentage Change field.
  • Define Diverging Colors:
    • Minimum: Dark Red.
    • Center: White.
    • Maximum: Dark Green.
  • Adjust Ranges: Set Minimum to the lowest percentage, Maximum to the highest, and Center as 0.
    If this post helped please do give a kudos and accept this as a solution
    Thanks In Advance

 

 

I am having the same issue. Trying to plot negative and positive percentages with gradient bubble map, but all my bubbles end up being the middle color.Screenshot 2025-02-12 132345.png

This does work better if I don't use Custom values, leave the defaults at high/middle/low values and make my colors more drastically different.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors