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

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.

Reply
Anonymous
Not applicable

Formatting background color in a table based on the condition from measure

Hi everyone, I have got a table that has two columns user and revenue%. User information comes from one table and revenue% comes from the measure. I want to change the background color for each user based on conditions. I tried using conditional formatting but it just allowed me for the highest and minimum for everyone in the table. I want to change the color for each user based on certain conditions for them. I have attached one photo here for detailed info. Thank youque.jpg 

7 REPLIES 7
wdx223_Daniel
Super User
Super User

wdx223_Daniel_0-1611536465079.png

you need a measure to define which color to apply

 

Anonymous
Not applicable

Hi super user II, can you please show the snapshot of the colors table. Just confused about what to enter into those columns of the colors table. Thank you.

wdx223_Daniel_1-1611539695162.png

 

Anonymous
Not applicable

Sorry for giving you trouble. Just got one issue. Since my revenue% is a calculated measure I couldn't give it inside the MAX function. The following error came:
The MAX function only accepts a column reference as the argument number 1.
What would be the solution for this?

adding a var

var _revenue=[Revenue%]

then use it to replace max()

lbendlin
Super User
Super User

Please provide sample data in usable format (not as a picture) , and show the expected outcome.

Anonymous
Not applicable

The thing is like the user name comes from one table that has so many columns. And revenue is the calculated measure that takes several column values from different tables.  How can I provide sample data for measure? 

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.