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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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