Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
83 | |
76 | |
65 |
User | Count |
---|---|
120 | |
112 | |
94 | |
84 | |
75 |