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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
AwesomeArnold
New Member

Filled Maps visual with 2 values to tally

Hello everyone,

 

to keep it simple: in my PowerBI application I'm trying to visualize the number of number of 0s and 1s a certain column has in Filled Maps. The more 0s the redder the region, the more 1s the greener. Unfortunately I can only quantify the number of 0s OR the number of 1s. There are several options to change this conditional formatting such as using AVERAGE, SUM etc. but nothing gives me the desired effect. For example on a continental level, the AVERAGE is really high.

AwesomeArnold_3-1678017982769.png

 

 

But when I drill down 1 level (the greener the more 1s)

AwesomeArnold_4-1678017996764.png

It clearly shows Canada is quite red (more 0s). Is filled map unable to perform my request? The Map visual does do it correctly: 

AwesomeArnold_5-1678018062287.png

My guess is that filled maps does it relatively compared to other regions (Netherlands is red for example.)

 

Any idea how to accomplish what I want? One option would be to make 2 types of Filled Maps, one to count the number of 0s and another to count the number of 1s. But then I wouldn't have a nice gradient of how many 0s vs 1s a certain region has. I could use all the help I get.

Thanks!

 

 

 

5 REPLIES 5
v-yueyunzh-msft
Community Support
Community Support

Hi @AwesomeArnold 

 

According to your current problem description, if your each country region contains both 0 and 1, my point is that you can only calculate the percentage ratio of 0 and 1 counts for each country region grouping, for this requirement can be calculated using the measure value, and then you can place this measure in the conditional format "gradient formatting" to achieve from red to green - > from 0 to 1, for the idea of writing the measure, You can refer to the Divide() function in DAX

DIVIDE function (DAX) - DAX | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Hi Aniya,

 

I think your solution works but indeed I would need to group things properly. That means if for example Canada is red, it's because the underlying percentages of Canada's regions are majority red (lots of 0s). At the moment if Canada has a lot of 0s, but Netherlands has more (for example) then Canada shows up green. Which of course I do not want... so I have to do some research how Grouping works in this case

Hi, @AwesomeArnold 

Depending on your situation, your judgment condition is the number of 0s and 1s. I think you can set a standard and calculate it as a percentage, one is the number of 0s and 1s, and the other is the percentage of 0s and 1s within itself to try.

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

v-yueyunzh-msft
Community Support
Community Support

Hi, @AwesomeArnold 

According to your problem description and screenshots, it seems that all countries in your filled map are only red or green, but there is no color shade or any conditional foramt application, but you want to achieve conditional foramt effect based on the count of some field values, I think there are two reasons for your current problem, one is your conditional If there is a problem with the application or setting of Foramt, you can refer to this official document to manually set the highest or lowest value according to the situation of your field value to achieve a layered display of color:
Filled Maps (Choropleth) in Power BI - Power BI | Microsoft Learn

vyueyunzhmsft_0-1678153658734.pngvyueyunzhmsft_1-1678153675220.png

Another possibility is that you have successfully enabled conditional foramt, but the corresponding value of the field has not been successfully grouped and displayed in the visual context of the filled map, and there is a problem with the value display, for this you can change the visual of the filled map to a table visual, to first check whether the corresponding value of each country region is the corresponding grouping value you want to achieve.

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi @v-yueyunzh-msft,

what do you mean "your value has not been properly grouped?"

The conditional formatting only works on one quantity. And because I have two (0 and 1) it is impossible to (as far as I can tell) use conditional formatting for this. One for the number of 0s and one for the number of 1s. I used the gradient formatting before but it only works for one quantity.

Thanks for your suggestion though!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.