Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Conditional formatting is not reflecting on the chart

The formatting that i put in is not reflecting.

 

  • Hi Anonymous 

     

    It is because you are using Average in Summarization. I see the axis field in chart is Month. If a month has multiple rows data in the table and has both 0 and 1 in Colour column, the average of color for this month will be a value between 0 and 1, which doesn't meet either rule. Only when its color values are all 1, its average will be 1. The same for 0. 

     

     

    I guess you drag [Monthly RF IQP Target%] and [Actual IQP%] columns into the chart as values, right? What are their aggregation type in the chart? If they are using Sum, you can create a measure like below. In conditional formatting setting, select Format by Field value and Based on this measure. 

    color measure =
    IF (
        SUM ( 'table'[Monthly RF IQP Target%] ) >= SUM ( 'table'[Actual IQP%] ),
        "Green",
        "Red"
    )
    

     

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

  • Anonymous's avatar
    Anonymous
    4 years ago

    Excellent.. working now..

5 Replies

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

    Hi Anonymous 

     

    It is because you are using Average in Summarization. I see the axis field in chart is Month. If a month has multiple rows data in the table and has both 0 and 1 in Colour column, the average of color for this month will be a value between 0 and 1, which doesn't meet either rule. Only when its color values are all 1, its average will be 1. The same for 0. 

     

     

    I guess you drag [Monthly RF IQP Target%] and [Actual IQP%] columns into the chart as values, right? What are their aggregation type in the chart? If they are using Sum, you can create a measure like below. In conditional formatting setting, select Format by Field value and Based on this measure. 

    color measure =
    IF (
        SUM ( 'table'[Monthly RF IQP Target%] ) >= SUM ( 'table'[Actual IQP%] ),
        "Green",
        "Red"
    )
    

     

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Excellent.. working now..

  • mahoneypat's avatar
    mahoneypat
    Icon for Microsoft Employee rankMicrosoft Employee

    It looks like your rules are set to values of exactly 1 or 0, and none of your bars are exactly that value.  Change to <= or >=.

     

    Pat

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Thanks for your response.

       

      I have tried conditional formatting as below. Kindly go through and support please.