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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Present grouped data in a filled map - colours not syncing within the group

I have a dataset named Heatmap which is in the shape/structure shared below:

ClusterRegionCountryIndustrySector% CAGR
EMEAMiddle EastQatar   
EMEAMiddle EastOman   
EMEAMiddle EastUAEConsumerPersonal Care12%
EMEAMiddle EastUAEIndustrialAutomotive5%
EMEAMiddle EastUAEHealthPharma6%
APAChina/HKChinaTelecomMedia10%
APAChina/HKHK   
APAUSUSConsumerPersonal Care13%
APAUSUSIndustrialAutomotive6%
APAUSUSHealthPharma16%
APAUSUSTelecomMedia30%
APAUKUKConsumerPersonal Care2%
APAUKUKIndustrialAutomotive65%
APAUKUKHealthPharma11%
APAUKUKTelecomMedia10%

(and so on)

 

My objective is to plot the Region column in a filled map visual, wherein:

1. The colour for Middle East should include, for example, Qatar, Oman and UAE. The colour for China should include China and HK. I have several such 'groups' of countries, where one country serves as a proxy for the concerned region.

2. The colours will be conditioned on the % CAGR column i.e. the higher the figure, the darker the colour and vice-versa.

3. Filters will include: Cluster, Region, Industry and Sector. When any of these filters are used, the map should continue to represent the full region, using the info of the proxy countries. 

4. Average of % CAGR is taken at the region level.

 

I've gotten as far as creating a conditional column:

2019-2022 CAGR (grouped) =
    var AvgME = CALCULATE(AVERAGE(Heatmap[2019-2022 CAGR]),FILTER(Heatmap,Heatmap[SCM region]="United Arab Emirates"))
    var AvgCNHK = CALCULATE(AVERAGE(Heatmap[2019-2022 CAGR]),FILTER(Heatmap,Heatmap[SCM region]="China"))
return
    IF((Heatmap[Territory]="Middle East"&&Heatmap[Industry]=""),AvgME,
        (IF((Heatmap[Territory]="China/HK"&&Heatmap[Industry]=""),AvgCNHK,
    Heatmap[2019-2022 CAGR])))))))

 

And a measure for the map color to support the conditional formatting:

Map Color =
    var AvgCAGR = CALCULATE(AVERAGE(Heatmap[2019-2022 CAGR (grouped)]))
return
    IF(AvgCAGR>=0.10,"#175d2d",
     IF(AND(AvgCAGR<0.10,AvgCAGR>=0.05),"#ffb600",
     IF(AvgCAGR<0.05,"#e0301e","#7d7d7d")))

 

But the 'groups' of countries are not formatted the same colour despite this - does anyone have any idea what I'm doing wrong?

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.