Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Rgieltjes_Meyn
Helper III
Helper III

Compare columns and base conditional formatting on it

Hi,

 

I want to set conditional formatting for example for column ''EDM Revision''. I want it to be green if it is the same as column ''IBD Revision''. I can't find a way to do that in the conditional formatting menu. Can someone help me??

Rgieltjes_Meyn_0-1721821937662.png

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Rgieltjes_Meyn , First create a measure

 

IsEqual = IF('Table'[EDM Revision] = 'Table'[IBD Revision], 1, 0)
 
  • In the Visualizations pane, click on the down arrow next to the "EDM Revision" column.
    Select "Conditional formatting" and then "Background color" or "Font color" depending on how you want to apply the formatting.
    Conditional Formatting Rules:
  • In the conditional formatting dialog, choose "Field value" under the "Format by" dropdown.
    In the "Based on field" dropdown, select the "EDM Revision" column.
    Click on "Rules" to define a new rule.
    Define the Rule:
  • In the rules dialog, set up a rule to compare the "EDM Revision" column to the "IBD Revision" column.
    For example, you can set a rule like:
    If "EDM Revision" is equal to "IBD Revision", then set the background color to green.
    To do this, you might need to create a measure or a calculated column that performs the comparison and returns a value that can be used in the conditional formatting rule.



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

1 REPLY 1
bhanu_gautam
Super User
Super User

@Rgieltjes_Meyn , First create a measure

 

IsEqual = IF('Table'[EDM Revision] = 'Table'[IBD Revision], 1, 0)
 
  • In the Visualizations pane, click on the down arrow next to the "EDM Revision" column.
    Select "Conditional formatting" and then "Background color" or "Font color" depending on how you want to apply the formatting.
    Conditional Formatting Rules:
  • In the conditional formatting dialog, choose "Field value" under the "Format by" dropdown.
    In the "Based on field" dropdown, select the "EDM Revision" column.
    Click on "Rules" to define a new rule.
    Define the Rule:
  • In the rules dialog, set up a rule to compare the "EDM Revision" column to the "IBD Revision" column.
    For example, you can set a rule like:
    If "EDM Revision" is equal to "IBD Revision", then set the background color to green.
    To do this, you might need to create a measure or a calculated column that performs the comparison and returns a value that can be used in the conditional formatting rule.



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.