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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Schanice
New Member

How to apply conditional formatting/ or create a measure to use conditional formatting

Hey guys

 

Very new to Power BI.

 

I've tried googling the answer, but can't seem to find what I'm after. Maybe 'cause it can't be done? So I thought I'd direct my question to the gurus. 

 

I'm trying to apply conditional formatting to a table in Desktop BI, on a column difference, as a currency, but when I try to highlight the negative figures in red, and positive in green. But, as it has parentheses denoting that it is a negative number, I can't enter the parentheses as a value in the data bars format. 

 

As an example, positive number is $692,477 and negative number is ($369,459)

 

Do I create a measure allowing me to add this ( ? Or can I format the $ column, to remove the ( and change it to a -? 

 

Also, the 2 columns, that I'm using to create the difference column, are calculated meausres. So that also seems to be an issue.. 

 

SEND HELP! 🙂

1 ACCEPTED SOLUTION
v-yinliw-msft
Community Support
Community Support

Hi @Schanice ,

 

You can try this method:

Sample data:

vyinliwmsft_0-1669345726230.png

MeasureF = SUM('Table'[First]) 
MeasureS = SUM('Table'[Second]) 
MeasureC = [MeasureF] - [MeasureS] 
ConditionalFormat =
SWITCH ( TRUE (), [MeasureC] < 0, "Red", [MeasureC] >= 0, "Green" )

The result is:

vyinliwmsft_1-1669345818169.png

vyinliwmsft_2-1669345834531.png

vyinliwmsft_3-1669345946189.png

 

Hope these help you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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

2 REPLIES 2
v-yinliw-msft
Community Support
Community Support

Hi @Schanice ,

 

You can try this method:

Sample data:

vyinliwmsft_0-1669345726230.png

MeasureF = SUM('Table'[First]) 
MeasureS = SUM('Table'[Second]) 
MeasureC = [MeasureF] - [MeasureS] 
ConditionalFormat =
SWITCH ( TRUE (), [MeasureC] < 0, "Red", [MeasureC] >= 0, "Green" )

The result is:

vyinliwmsft_1-1669345818169.png

vyinliwmsft_2-1669345834531.png

vyinliwmsft_3-1669345946189.png

 

Hope these help you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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

 

 

TomMartens
Super User
Super User

Hey @Schanice ,

 

first - welcome to Power BI and welcome to this community.

 

It's always very helpful if you provide a pbix file that contains sample data but still reflects your data model (tables, relationships, calculated columns, and measures). Upload the pbix file to onedrive, google drive, or dropbox and share the link. If you are using Excel to create the sample data instead of the manual input method, share the Excel file as well.

Sample data is always very helpful. Sample data avoids misunderstanding and finally safes a lot of time.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors