Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

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??

 

  • Anonymous , 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.

1 Reply

  • Anonymous , 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.