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
Syndicate_Admin
Administrator
Administrator

Compare measure to column, conditional formatting

Good afternoon.

I can't calculate so that of an average I calculate it with a target value of a table and I put it in conditional format, I tell you:

I have calculated the average of a series of indicators and in a table I have for some of those indicators a series of target values to see if they are met, I need you to compare the average with the value and tell me if or not it is not met, or a conditional format.

promedio.png

According to the indicator the comparison will be for < or >

Greetings and thanks.

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @Aguirre ,

 

According to the information I'm seeing you need to do something similar to:

 

Comparision = IF( [Promedio] < SUM(Table[Objective]), 1, 0)

I assume your Objective is the column on the model then just use the 1 and the 0 to make your condittional formatting.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

v-yalanwu-msft
Community Support
Community Support

Hi, @Syndicate_Admin 

 

You could create a measure by the following formula:

condiional =
IF ( MAX ( 'Table'[Promedio] ) < 'Table'[Objetivo2], "Green", "Red" )

Then apply conditional formatting: you could choose the background or font color.

v-yalanwu-msft_0-1618825188620.jpegv-yalanwu-msft_1-1618825194850.jpeg


The final output is shown below:

v-yalanwu-msft_2-1618825205367.png

If it does not make sense, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Best Regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
v-yalanwu-msft
Community Support
Community Support

Hi,
Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your problem
v-yalanwu-msft
Community Support
Community Support

Hi, @Syndicate_Admin 

 

You could create a measure by the following formula:

condiional =
IF ( MAX ( 'Table'[Promedio] ) < 'Table'[Objetivo2], "Green", "Red" )

Then apply conditional formatting: you could choose the background or font color.

v-yalanwu-msft_0-1618825188620.jpegv-yalanwu-msft_1-1618825194850.jpeg


The final output is shown below:

v-yalanwu-msft_2-1618825205367.png

If it does not make sense, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Best Regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Using the same exemple. How can I do a conditional formatting comparing promedio's avarege and objetivo's avarege? 

MFelix
Super User
Super User

Hi @Aguirre ,

 

According to the information I'm seeing you need to do something similar to:

 

Comparision = IF( [Promedio] < SUM(Table[Objective]), 1, 0)

I assume your Objective is the column on the model then just use the 1 and the 0 to make your condittional formatting.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hello and thank you for the answer.
Several problems, I have empty cells and this way I would put them as a 0, and then as the field varies the comparison, it could be <o>, I'm thinking of adding an additional column to control that.

You can control that on the IF measure itself.

 

Can you share a small sample and expected result for each line?


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Good morning and sorry for the delay, I have finally changed the idea and solved it with a meter, since I have seen it easier. thank you very much for the help.

Hi and thanks for the answer.
Several problems, I have empty cells and in this way I would put them as a 0, and then according to the field the comparison varies, it could be <or>, I am thinking of adding an additional column to control that.

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.