Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
HI, I want to apply conditional formatting on a column in Table Visual.
Problem Statement : I have a Balance column. I want to format it in such a way that if the value is less than 0, then the background should be Red. If the value is greater than 0, then the value should be Green.
Thanks in advance!!
Solved! Go to Solution.
This measure will not color balance = 0
Color =
var _sum = CALCULATE( SUM( Table1[Balance] ) )
return SWITCH( true,
_sum < 0, "Red",
_sum > 0, "Green"
)
Then apply to table column
Used this for input
Table.FromRows( { { "A", 1 }, { "A", -2 }, { "B", 3 }, { "C", 0 } }, type table [Name=text, Balance=Int64.Type] )
Polite reminder.
Remeber we are unpaid volunteers.
Click the thumbs up and accept as solution button.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
This measure will not color balance = 0
Color =
var _sum = CALCULATE( SUM( Table1[Balance] ) )
return SWITCH( true,
_sum < 0, "Red",
_sum > 0, "Green"
)
Then apply to table column
Used this for input
Table.FromRows( { { "A", 1 }, { "A", -2 }, { "B", 3 }, { "C", 0 } }, type table [Name=text, Balance=Int64.Type] )
Thank you so much for your solution.
Create this dax measure
BalanceRAG =
IF( SUM(tanlename[Balance]) >= "Green","Red")
Click on the Balance field in your visual right hand side fields well, conditional formating, background colour, based on Fields, Field = BalanceRAG
Please click thumbs up and accept as solution
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.