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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Conditional formatting

I plotted table with measure1 and measure2, I want to apply conditional formatting if my measure1 is equal to measure2 then green else red

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please try to create one more measure like below.

 

newmeasure = if ( measure1 = measure2, 1,0)

Then, go into the conditional formatting, Format By = Field Value -> select newmeasure -> 1 = green / 0 = red

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi @Anonymous 

You can create a measure and implement it with the IF function

flag color = IF('Table'[Measure 1]='Table'[Measure 2], "Green","Red")

Sample data:

v-angzheng-msft_0-1617774299537.jpeg

Click on the field that you want to use conditional formatting, in this case the Flag Color field,

and then select the way to use the conditional formatting,

Format by>>Field value, Based on the measure you create,

v-angzheng-msft_1-1617774299540.jpeg

v-angzheng-msft_2-1617774299542.jpeg

v-angzheng-msft_3-1617774299543.jpeg

Result:

v-angzheng-msft_4-1617774299545.jpeg

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please try to create one more measure like below.

 

newmeasure = if ( measure1 = measure2, 1,0)

Then, go into the conditional formatting, Format By = Field Value -> select newmeasure -> 1 = green / 0 = red

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

amitchandak
Super User
Super User

@Anonymous , Create a color measure and use that in conditional formatting with "Field Value" Option 

 

if([measure1] =[measure2] , "Green", "Red")

 

Refer my video for steps: https://www.youtube.com/watch?v=RqBb5eBf_I4

 

or

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.