The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I am struggling with making a heatmap.
I have a data like the below (for most of the countries in the EU)
Type: PLUG-IN HYBRID | Country: Switzerland | Number of registered vehicles 1,713 |
HYBRID ELECTRIC | Switzerland | 6,380 |
OTHERS | Switzerland | 1 |
PETROL | Switzerland | 6,716 |
DIESEL | Switzerland | 2,052 |
I am choosing the 'Filled map' option. But I don't know where to create a heatmap there. There are two places I can put the number of cars and it does not work. I am getting the following:
or this:
How can I do this? I tried other map visuals from the Store and they all require a licence
Solved! Go to Solution.
@Anonymous You have used Sum of cars in the field value for rules. Replace it with your [% of Grand Total cars] measure. Because Sum of cars will yield whole numbers not percentages.
Thanks,
Jai
Proud to be a Super User! | |
Hi @Anonymous ,
Please follow the steps below:
1. This is my %of grand total sales for cars:
2. Create rules for the filled map:
3. We could get the results below:
Best regards,
Lucy Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Map your country column to the location field of the filled map visual and use Fill Color option available under the Visual settings, create a rule or measure to color the countries based on their number of cars like below.
Did I answer your question ? If yes, please mark this post as a solution.
Thanks,
Jai
Proud to be a Super User! | |
Thank you for your help. The data I have will have a slicer too - so I can select all cars, but can also filter based on type: petrol, diesel etc. I think Fill Colours will only work on static numbers and will not show properly If i select different variations? Do I understand it right?
@Anonymous The heatmap can be dynamically formatted by using a measure based on the slicer selection. In the below file I have categorized the countries ranging from < 20% as red, >30% as yellow and >40% as green. You can refer the measure and tweak your DAX accordingly. Attached the PBIX file here: Download PBIX
Did I answer your question ? If yes, please mark this post as a solution.
Thanks,
Jai
Proud to be a Super User! | |
Hello @Jai-Rathinavel thanks for that, I think I might just make it work. I am struggling with the rules. Can you see what am I doing wrong there?
I have a % of grand total for the cars - showed in a table and the rules, but the map does not show the right colours.
@Anonymous You have used Sum of cars in the field value for rules. Replace it with your [% of Grand Total cars] measure. Because Sum of cars will yield whole numbers not percentages.
Thanks,
Jai
Proud to be a Super User! | |
Hi @Anonymous - The Filled Map isn't strictly a heatmap but can emulate one using gradients.
If you need a true heatmap - Mapbox Visual (requires a free account). or Synoptic Panel (create custom map overlays).
or
or you can use map visual from power bi as below:
Hope this helps.
Proud to be a Super User! | |
User | Count |
---|---|
85 | |
84 | |
36 | |
34 | |
31 |
User | Count |
---|---|
92 | |
79 | |
66 | |
55 | |
52 |