Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Heatmap using 'Filled Map' based on values

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 ELECTRICSwitzerland6,380
OTHERSSwitzerland1
PETROLSwitzerland6,716
DIESELSwitzerland2,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

  • 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

7 Replies

  • 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.

  • 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

    • Anonymous's avatar
      Anonymous
      Not applicable

      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?

      • Jai-Rathinavel's avatar
        Jai-Rathinavel
        Super User

        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

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.