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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
webportal
Impactful Individual
Impactful Individual

A simple conditional formatting rule

Hello,

I would like a conditional formatting rule, like:

  • Red if the value of the measure is negative
  • Green otherwise

Please illuminate me:

webportal_0-1739192421486.png

Thank YOU!

6 REPLIES 6
Anonymous
Not applicable

Hi @webportal ,

 

Please try creating a new measure:

 

Color = 
VAR __diff = DIVIDE([ThisYear], [PrevYear])-1
VAR __result = IF(__diff < 0, "Red", "Green")
RETURN
    __result

And apply it to the field value:

vcgaomsft_2-1739238222801.png

vcgaomsft_1-1739238177195.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

webportal
Impactful Individual
Impactful Individual

Hello @Anonymous 

Ok, but then for each measure I want a conditional formatting, I'll need another measure.

There should be a better way.

speedramps
Super User
Super User

Try this

 

speedramps_0-1739192909076.png

 

Please click the thumbs up and accept solution buttons.

 

Try learn basic Power BI with these free links efore asking more simple questions. Thanks.
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting

https://www.youtube.com/watch?v=IgYiWRPqIZU

 

Hello,

Here it is:

webportal_0-1739196264692.png

 

bhanu_gautam
Super User
Super User

@webportal , Can you provide details of column and conditions




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

Proud to be a Super User!




LinkedIn






Yes, it's just a annuall sales variation.
DIVIDE([ThisYear], [PrevYear])-1

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.