Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Map chart, how to use condition based formatting for values? Individual per city

Hello together!

 

I took over an PowerBI report, where I now want to change the map-chart.

There are different cities, and based on the value of the city, the city-dot gets green, yellow or red. 

Currently defined green >80%, yellow >60%, red <60%. But I can't see where this has been set. In the normal formatting overview it's not visible.

 

I want to change that, so that each city has it's own individual target when it gets which color (green, yellow or red color).

For example city1, if >50% = green. <30% = red. And so on.

How can I do that?

 

Thanks in advance! 🙂 

  • Hi Anonymous ,

    In your formula, as the value of City "X" is 37.5% and it meet the standard of yellow, which is less than 0.55, so it shows yellow, you can modify it like this:

    Measure = 
    SWITCH (
        TRUE (),
        MAX ( all_mes_join[Site / Center] ) = "X"
            && MAX ( 'all_mes_join'[OEE] ) >= 0.55, "Green",
        MAX ( all_mes_join[Site / Center] ) = "X"
            && MAX ( all_mes_join[OEE] ) >= 0.4
            && MAX ( all_mes_join[OEE] ) < 0.55, "Yellow",
        MAX ( all_mes_join[Site / Center] ) = "X"
            && MAX ( all_mes_join[OEE] ) < 0.40, "Red",
        "Purple"
    )
    

    I attach my sample below for reference.

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Anonymous , You need to create a color measure and use that is conditional formatting and with field value option

     

     

    Switch( True() ,

    max(Table[City]) ="City1" && [Measure] >.5 , "Green",

    max(Table[City]) ="City1" && [Measure] <.3 , "Red",

    max(Table[City]) ="City2" && [Measure] >.6 , "Green",

    /// add other

    "Red"

    )

     

     

    conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

    • Anonymous's avatar
      Anonymous
      Not applicable

      This one worked for me to get the coloring right:

       

      OEE-color weekly = Switch( True() ,

      max(v_mes_powerbi_weekly[Site / Center]) ="1" && average(v_mes_powerbi_weekly[OEE]) >=.5 , "Green",
      max(v_mes_powerbi_weekly[Site / Center]) ="1" && average(v_mes_powerbi_weekly[OEE]) <.5 && average(v_mes_powerbi_weekly[OEE]) >.35, "Yellow",
      max(v_mes_powerbi_weekly[Site / Center]) ="1" && average(v_mes_powerbi_weekly[OEE]) <=.35 , "Red",
      /// add other

      "grey"

      )
  • Anonymous's avatar
    Anonymous
    Not applicable

    amitchandak :

    I have it now almost in place. There is one last error + I have 1 question:

    1. The errror: The value for City "X" = 37.5% and it's not showing the correct color. It shows yellow color, but it must be red color. Whats the issue?
    2. Question: How can I say in the measurement "equals or bigger then"?

     

     

    My measure:

     

    Switch( True() ,

    max(all_mes_join[Site / Center]) ="X" && all_mes_join[OEE] >.55 , "Green",

    max(all_mes_join[Site / Center]) ="X" && all_mes_join[OEE] <.55 , "Yellow",

    max(all_mes_join[Site / Center]) ="X" && all_mes_join[OEE] <.40 , "Red",
     
     
    Thanks!
  • Hi Anonymous ,

    In your formula, as the value of City "X" is 37.5% and it meet the standard of yellow, which is less than 0.55, so it shows yellow, you can modify it like this:

    Measure = 
    SWITCH (
        TRUE (),
        MAX ( all_mes_join[Site / Center] ) = "X"
            && MAX ( 'all_mes_join'[OEE] ) >= 0.55, "Green",
        MAX ( all_mes_join[Site / Center] ) = "X"
            && MAX ( all_mes_join[OEE] ) >= 0.4
            && MAX ( all_mes_join[OEE] ) < 0.55, "Yellow",
        MAX ( all_mes_join[Site / Center] ) = "X"
            && MAX ( all_mes_join[OEE] ) < 0.40, "Red",
        "Purple"
    )
    

    I attach my sample below for reference.

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.