Join 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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
i want to add column in below table which should show different background color for each priorty . example it should show green background for 0, orange for 1 and red for 2, the column should not show any data
Solved! Go to Solution.
Create a measure that will display the priority. Apply background conditional formatting for this measure something like the below dax:
PriorityColor =
SWITCH(
TRUE(),
TableName[Priority] = 0, "Green",
TableName[Priority] = 1, "Orange",
TableName[Priority] = 2, "Red",
BLANK()
)
To ensure the column does not display any values make sure to format the text color to match the background color (via Conditional Formatting for text). Alternatively, make the font color transparent or very light so it blends with the table.
Hi @powerbiexpert22,
Add a measure using the following DAX
Priority Color = BLANK()
Now drag and drop the color measure to your Matrix, and add a conditional format as shown bellow:
Now configure the prompt screen to something like this and hit ok:
Now your table, should look like this:
I hope this was heplful, if yes please accept as solution and give a kudo.
Thank you
Yes you can use any colour you like...
Replace "Orange" with the hex colour code of your liking. e.g. "#FFFFFF"
Hi @powerbiexpert22,
Add a measure using the following DAX
Priority Color = BLANK()
Now drag and drop the color measure to your Matrix, and add a conditional format as shown bellow:
Now configure the prompt screen to something like this and hit ok:
Now your table, should look like this:
I hope this was heplful, if yes please accept as solution and give a kudo.
Thank you
Create a new calculated column to hold blank values (it will serve as the placeholder for formatting):
BlankColumn = BLANK()
Create a measure to define the color logic for each priority:
PriorityColor =
SWITCH(
TRUE(),
'YourTable'[Priority] = 0, "#00FF00",
'YourTable'[Priority] = 1, "#FFA500",
'YourTable'[Priority] = 2, "#FF0000",
"#FFFFFF" -- Default to white
)
In the Conditional Formatting settings for BlankColumn, select the PriorityColor measure as the field for background color.
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Hey,
You can create a measure to control the different colours and use that measure for conditional formatting.
Yes you can use any colour you like...
Replace "Orange" with the hex colour code of your liking. e.g. "#FFFFFF"
Create a measure that will display the priority. Apply background conditional formatting for this measure something like the below dax:
PriorityColor =
SWITCH(
TRUE(),
TableName[Priority] = 0, "Green",
TableName[Priority] = 1, "Orange",
TableName[Priority] = 2, "Red",
BLANK()
)
To ensure the column does not display any values make sure to format the text color to match the background color (via Conditional Formatting for text). Alternatively, make the font color transparent or very light so it blends with the table.
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.