Forum Discussion

holydragon's avatar
holydragon
Frequent Visitor
4 years ago

OKViz Synoptic Panel - Changing Map colors based on category

Hello,

 

I have created a .svg map for Synoptic Panel that needs to have its areas change based on three different columns of data.  The columns contain the ratings of  high, low, med and the corresponding population, income, and pet ownership.

 

Area   Pop   Income  PO

A1        L          H         L

A2        H         L          M

A3        M        M         H

 

In order to change colors according the category, I reformatted to data to:

Area   Pop   Income  PO

A1        L      Pop

A2        H     Pop

A3        M    Pop

A1        H     Income

A2        L      Income

A3        M    Income

A1        L      PO

A2        M    PO

A3        H     PO

 

When I select Pop - I get the colors corresponding to H, M, L

When I select Income or PO, I get nothing and the values show "blank" when I mouseover the areas.

 

Anyone know how to get this working?

 

What am essentailly doing is using one map for several categories of data.  The color change based on the category selected.

 

 

HD

1 Reply

  • v-jingzhang's avatar
    v-jingzhang
    Icon for Community Support rankCommunity Support

    Hi holydragon 

     

    It's not clear enough. Which data is the "category" data? Does it refer to the population, income, and pet ownership? And are you setting up conditional formatting to change the colors? 

     

    Based on my understanding, you can first unpivot the table in Power Query Editor. For the first table, right click on "Area" column header and select "Unpivot Other Columns". 

    Then create a measure to decide the colors according to rating values. Then use this measure to set the conditional formatting colors. Below is an example with a table visual. 

    Color = SWITCH(SELECTEDVALUE('Table'[Value]),"H","Red","M","Yellow","L","Green")

     

    If this is not what you want, can you provide more details like how do you change colors currently and what is your expected result?

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.