Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi Guys,
I would like to create a shape map where colour saturation depends on the value for the customised region.
I have downloaded a shape map of the world and connected it to my data via ISO codes (I have ISO in the 'Location' box). I put 'Units Delta' in the Color Saturation and I get a nice map where the countries are colored in shades of red for negative values and in shades of green for positive values.
Now I would like to have similar map, but with coloring based on values for not single countries but regions as a whole. E.g. if I had a region containing two countries: country A with units delta of -50, country B with units delta of 140, I would like them both colored in the same shade of green associated with the units delta of 90.
I have the regions specified in one of the columns of my data. I have tried putting RegionName in the Legend, but what I achieved was having the countries in different colors depending only on the region, without taking into consideration the units delta at all...
Any suggestions how can I proceed here?
@Anonymous
For your requirement, you need to add a REGION column in your dataset. Then create a measure to calculate the 'Units Delta' group on REGION:
Region Total Units Delta=CALCULATE(SUM(Table[Units Delta]),ALLEXCEPT(Table,Table[REGION]))
Now you can put above measure into color saturation.
Regards,
Hi @v-sihou-msft,
Thank you for your reply. I have tried exactly that and neverthless didn't get the desired result.
GTMU Delta regional = CALCULATE(sum(Query1[GSales Units]),ALLEXCEPT(Query1,Query1[RegionKey]))-CALCULATE(sum(Query1[Previous GSales Units]),ALLEXCEPT(Query1,Query1[RegionKey]))
After I add the measure above to the Color Saturation field, without the Region as Legend it just colors all countries the same, after I add Region to Legend, regions are colored differently, but irrespective of the regional delta value.
Could you please let me know where do you think is the issue with my approach?
Thank you,
Agnieszka
User | Count |
---|---|
84 | |
80 | |
70 | |
47 | |
43 |
User | Count |
---|---|
108 | |
54 | |
50 | |
40 | |
40 |