Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Map visual - legend based on two columns

Hi,

 

I have the below data

 

POSTCODEPop_MPop_FTotal_Pop
2081121527
2083123101224
2094423399822
2104161430

 

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 size

     

    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.

4 Replies

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

     

    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.

    • Anonymous's avatar
      Anonymous
      Not applicable

      apologies - it worked. bit more complicated but I can see that it will work given a bit of effort 🙂 

      • parry2k's avatar
        parry2k
        Super 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.