Forum Discussion
Map visual - legend based on two columns
Hi,
I have the below data
| POSTCODE | Pop_M | Pop_F | Total_Pop |
| 2081 | 12 | 15 | 27 |
| 2083 | 123 | 101 | 224 |
| 2094 | 423 | 399 | 822 |
| 2104 | 16 | 14 | 30 |
Is it possible to create a map visualization with size as Total_pop and legend as a pie chart of Pop_M and Pop_F?
If so how?
Thanks
Sam
Anonymous I will unpivot the data and then it will work
- transform data
- remove Tot_POP Column
- select post code column
- right-click, unpivot other columns it will add two columns, attribute, and value, rename these as per your requirement
- close and apply
To visualize,
- use attribute on the legend
- values on sizeI would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
4 Replies
- parry2kSuper User
Anonymous I will unpivot the data and then it will work
- transform data
- remove Tot_POP Column
- select post code column
- right-click, unpivot other columns it will add two columns, attribute, and value, rename these as per your requirement
- close and apply
To visualize,
- use attribute on the legend
- values on sizeI would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
- AnonymousNot applicable
I don't think this is possible with the underlying dataset as postcode column is unique values - I tried and couldn't seem to get it to work.
See data:
https://drive.google.com/file/d/1m9C5TDx8GJv4o-9Z_KEL8aCZjR9f2g-E/view?usp=sharing
- AnonymousNot applicable
apologies - it worked. bit more complicated but I can see that it will work given a bit of effort 🙂
- parry2kSuper User
Anonymous good to hear. reach out for any other question.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡