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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
user01
Resolver I
Resolver I

Conditional Formatting with Field Parameter using Filled Map in Azure Map visualization

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

user01_0-1735961304098.png

Desired Example: Category = B, Field/Column = Employee

user01_1-1735961388143.png

 

Dummy data:

CategoryStateEmployeeAmount
AVirginia681114208
AUtah1441075717
AMichigan381074534
AIllinois1151074214
ANevada1041067658
AMassachusetts931065064
ANew Hampshire421005700
ACalifornia105946129
AMaine101905930
AWashington134878621
ANew Jersey76851987
APennsylvania110850507
AWest Virginia77828861
ARhode Island88811964
AConnecticut70802208
ANew York129798794
ADelaware114783194
AIdaho18734638
AMaryland125706365
ATennessee69688048
AWisconsin97668750
AKansas65665809
AMississippi132580631
AVermont106575309
AGeorgia177520854
BWisconsin971706845
BMassachusetts931477807
BMaine1011394473
BIdaho181358479
BRhode Island881184244
BNew Jersey761177116
BUtah1441143117
BTennessee691084389
BPennsylvania1101032075
BWest Virginia77892761
BConnecticut70865538
BKansas65864826
BVirginia68862125
BCalifornia105848612
BNew York129818033
BWashington134764280
BMaryland125710922
BGeorgia177708657
BVermont106698224
BIllinois115695709
BMississippi132675824
BDelaware114657883
BMichigan38630631
BNevada104539081
BNew Hampshire42484559

 

1 ACCEPTED 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:

user01_0-1736396414882.png

 

View solution in original post

5 REPLIES 5
BIswajit_Das
Super User
Super User

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
r1.pngr2.png
Thanks & Regards ...

@BIswajit_Das 

Thank you. I did not open your file, but I'm guessing we had the same idea?

 

https://community.fabric.microsoft.com/t5/Desktop/Conditional-Formatting-with-Field-Parameter-using-...

Anonymous
Not applicable

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.

vhuijieymsft_0-1736315895618.png

 

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:

user01_0-1736396414882.png

 

Anonymous
Not applicable

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!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors