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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
krishb1414
Helper III
Helper III

Color Formatting directly to column

Hi Everyone, 

I have to color format based on range as shown in below image, If it is 0-20 then Green, 20-30 then Amber and > 30 then red. But when i try to use FX in color format then if i select a column (particular range) then it will take aggregate automatically as shown in 2nd image. 

 

And also,I tried to write a measure, but measure doesn't read column directly, so i can't able to write it.

 

Please help me how to do color format in this scernario. Its very urgent.

 

f8026f26-20ce-43c5-96d1-eb5944fc7fc7.pngaggr.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @krishb1414 ,

 

Here are the steps you can follow:

1. Create measure.

Color =
SWITCH(
    TRUE(),
    MAX('Table'[Range])="0-20","#4CAF50",
    MAX('Table'[Range])="20-30","#FFC107",
    MAX('Table'[Range])="30-100","#f44336")

2. Go to the Background color interface.

Format style – Field value

Select [Color]

vyangliumsft_0-1673574790034.png

3. Result:

vyangliumsft_1-1673574790035.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @krishb1414 ,

 

Here are the steps you can follow:

1. Create measure.

Color =
SWITCH(
    TRUE(),
    MAX('Table'[Range])="0-20","#4CAF50",
    MAX('Table'[Range])="20-30","#FFC107",
    MAX('Table'[Range])="30-100","#f44336")

2. Go to the Background color interface.

Format style – Field value

Select [Color]

vyangliumsft_0-1673574790034.png

3. Result:

vyangliumsft_1-1673574790035.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi, 

 

It means you entered values statically in measure, what if I change values in column (Range Column)

For example Instaed of "0-20" to "0-10"  or "20-30" to "10-20". It will be blank or no color right.

 

So, what do i do in such scenario ? 

 

Please help me in this cases.

TomMartens
Super User
Super User

Hey @krishb1414 ,

 

I must admit that I do not understand what you want to achieve. Please provide a pbix file that contains sample data but still reflects your data model (tables, relationships, calculated columns, and measures). Upload the pbix to onedrive, google drive, or dropbox and share the link. Describe the requirement based on the sample data you provide.

If you want to keep your solution more dynamic, then it is helpful creating a table that contains two columns (left bound and right bound) instead of a single column.

 

I'm also wondering about the color you want to use if the value is

20, 

30 or above 

100.

 

Regards, 

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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