Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have some dummy data below. EDIT: I uploaded an Excel workbook to Power BI, but the real data will be coming from SQL Server via DirectQuery. The solution must work with DirectQuery.
I want to use the Filled Map setting in the Azure Map visualization with a Field Parameter. There will be TWO slicers: one slicer for the Category column, and one slicer for the Field Parameter. The Field Parameter is for the Employee column and the Amount Column. The Field Parameter is called 'View' in my example.
I want the color for the filled map to be a gradient where the largest number in the select field/column is darkest, and 0 is used as the minimum and lightest.
Below is the desired result, but I changed the conditional gradient manually in the Colors setting of Filled Map.
Desired Example: Category = A, Field/Column = Amount
Desired Example: Category = B, Field/Column = Employee
Dummy data:
Category | State | Employee | Amount |
A | Virginia | 68 | 1114208 |
A | Utah | 144 | 1075717 |
A | Michigan | 38 | 1074534 |
A | Illinois | 115 | 1074214 |
A | Nevada | 104 | 1067658 |
A | Massachusetts | 93 | 1065064 |
A | New Hampshire | 42 | 1005700 |
A | California | 105 | 946129 |
A | Maine | 101 | 905930 |
A | Washington | 134 | 878621 |
A | New Jersey | 76 | 851987 |
A | Pennsylvania | 110 | 850507 |
A | West Virginia | 77 | 828861 |
A | Rhode Island | 88 | 811964 |
A | Connecticut | 70 | 802208 |
A | New York | 129 | 798794 |
A | Delaware | 114 | 783194 |
A | Idaho | 18 | 734638 |
A | Maryland | 125 | 706365 |
A | Tennessee | 69 | 688048 |
A | Wisconsin | 97 | 668750 |
A | Kansas | 65 | 665809 |
A | Mississippi | 132 | 580631 |
A | Vermont | 106 | 575309 |
A | Georgia | 177 | 520854 |
B | Wisconsin | 97 | 1706845 |
B | Massachusetts | 93 | 1477807 |
B | Maine | 101 | 1394473 |
B | Idaho | 18 | 1358479 |
B | Rhode Island | 88 | 1184244 |
B | New Jersey | 76 | 1177116 |
B | Utah | 144 | 1143117 |
B | Tennessee | 69 | 1084389 |
B | Pennsylvania | 110 | 1032075 |
B | West Virginia | 77 | 892761 |
B | Connecticut | 70 | 865538 |
B | Kansas | 65 | 864826 |
B | Virginia | 68 | 862125 |
B | California | 105 | 848612 |
B | New York | 129 | 818033 |
B | Washington | 134 | 764280 |
B | Maryland | 125 | 710922 |
B | Georgia | 177 | 708657 |
B | Vermont | 106 | 698224 |
B | Illinois | 115 | 695709 |
B | Mississippi | 132 | 675824 |
B | Delaware | 114 | 657883 |
B | Michigan | 38 | 630631 |
B | Nevada | 104 | 539081 |
B | New Hampshire | 42 | 484559 |
Solved! Go to Solution.
@Anonymous
Thank you! Actually, I just needed that measure. This is the idea I had. Using your measure, the resulting map looks right. Do you see a potential problem?
Your measure:
Measure =
SWITCH(
SELECTEDVALUE(Parameter[Parameter Fields]),
"'Table'[Employee]", SUM('Table'[Employee]),
"'Table'[Amount]", SUM('Table'[Amount])
)
Next Steps:
Turn off Bubble Layer > Turn on Filled Map > Colors > Conditional Formatting > Format Style = Gradient > Base on = Measure > Adjust color, Min, Max
Result:
Hello @user01 , @Anonymous
As per @user01 requirement by using @Anonymous measure DAX the visual can be modified. You can check the below attached file to check.
File Link : https://ufile.io/xsaom5o8
Thanks & Regards ...
Thank you. I did not open your file, but I'm guessing we had the same idea?
Hi @user01 ,
I am not able to implement color gradient in Azure map visual object, below is the test result of displaying Amount, Employee values of different categories in Azure map based on the value selected by slicer after I created the field parameter.
Created a measure.
Measure =
SWITCH(
SELECTEDVALUE(Parameter[Parameter Fields]),
"'Table'[Employee]", SUM('Table'[Employee]),
"'Table'[Amount]", SUM('Table'[Amount])
)
Drag the State field to the location of the Azure map and drag the measure to the size.
Now you can choose the value you want based on the slicer.
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!
@Anonymous
Thank you! Actually, I just needed that measure. This is the idea I had. Using your measure, the resulting map looks right. Do you see a potential problem?
Your measure:
Measure =
SWITCH(
SELECTEDVALUE(Parameter[Parameter Fields]),
"'Table'[Employee]", SUM('Table'[Employee]),
"'Table'[Amount]", SUM('Table'[Amount])
)
Next Steps:
Turn off Bubble Layer > Turn on Filled Map > Colors > Conditional Formatting > Format Style = Gradient > Base on = Measure > Adjust color, Min, Max
Result:
Hi @user01 ,
Thanks for the reply from BIswajit_Das .
It looks like you have found a solution. Could you please mark this helpful post as “Answered”?
This will help others in the community to easily find a solution if they are experiencing the same problem as you.
Thank you for your cooperation!
I can open BIswajit_Das's pbix file, his pbix file is attached, you guys are on the same page.
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!