Forum Discussion

deonaman's avatar
deonaman
Frequent Visitor
1 year ago
Solved

Column Data Color Formatting not working Power BI

I have added a conditional colour formatting. however, it doesn't seem to be working. The rule is if the percentage is less than 40% column colour should be red otherwise green. The column data is a measure

 

 

Anything below the Target line should be red as per the rule below. Any reason why conditional formatting is not working properly

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi deonaman ,

     

    Thank you for your interest in this case. The method provided is basically correct, I just performed a test and a more detailed description.

     

    I ran the test, this is my example data, %Actual is a measure.

     

    Be sure to set the data type (Actual %) of the measure to a percentage. Sometimes the base format may still be a number even though the data is displayed as a percentage.

     

    Under the Format pane, select “column”>>f(x) to set the conditional format. When setting the condition format, use the “Number” format instead of the “Percent” format after checking your measure.

     

    This is the original visual object:

     

    This is the visual object after applying conditional formatting:

     

    If it hasn't been resolved, please provide a Power BI Desktop file in progress (with sensitive information removed) that fully covers your issue or question in a usable format (not a screenshot). You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive (set up public access), SharePoint, or a Github repository, and then share the URL of the file.

     

    The pbix file is attached.

     

    If you have any other questions please feel free to contact me.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

5 Replies

  • Hi deonaman  Try this way:

     

     

    Hope this helps!!

    If this solved your problem, please accept it as a solution and a kudos!!

     

    Best Regards,
    Shahariar Hafiz

  • freginier's avatar
    freginier
    Solution Sage

    Hey there!

     

    I feel like your conditions aren't working because of the yellow, is the yellow neccessary? 

    Power BI applies the rules in order, so maybe it is messing with the red rule and not sure which rule to apply. 

     

    Try doing: 

    Green → If value > 40% AND <= 100%
    Red → If value < 40% 

    Maybe this will help!

     

    Hope this helps,

    Zoe 😁😁

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi deonaman ,

     

    Thank you for your interest in this case. The method provided is basically correct, I just performed a test and a more detailed description.

     

    I ran the test, this is my example data, %Actual is a measure.

     

    Be sure to set the data type (Actual %) of the measure to a percentage. Sometimes the base format may still be a number even though the data is displayed as a percentage.

     

    Under the Format pane, select “column”>>f(x) to set the conditional format. When setting the condition format, use the “Number” format instead of the “Percent” format after checking your measure.

     

    This is the original visual object:

     

    This is the visual object after applying conditional formatting:

     

    If it hasn't been resolved, please provide a Power BI Desktop file in progress (with sensitive information removed) that fully covers your issue or question in a usable format (not a screenshot). You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive (set up public access), SharePoint, or a Github repository, and then share the URL of the file.

     

    The pbix file is attached.

     

    If you have any other questions please feel free to contact me.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!