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

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors