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 August 31st. Request your voucher.

Reply
Anupal
Frequent Visitor

Color coding Columns based on a field

Hello, I need to color code columns[QTD,YTD,Base Revenue& Total] for product as END POINTs and SAAS (same columns but deferentiated based on product).

 

Below is what I am expecting.

 

Need guidance in achiving this in the matrix of PBI visual.

 

 

Anupal_0-1712230359087.png

 

Thanks

AP

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anupal ,

 

You can apply the following formula to conditional formatting, see below:

M_ =
SWITCH (
    SELECTEDVALUE ( 'Table'[Product] ),
    "END POINTS", "Yellow",
    "SAAS", "green"
)

vkongfanfmsft_0-1712299561097.png

vkongfanfmsft_1-1712299611398.png

 

Best Regards,
Adamk Kong

 

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
johnbasha33
Super User
Super User

@Anupal 
ProductCategory =
SWITCH(TRUE(),
'YourTableName'[Product] = "END POINTs", "END POINTs",
'YourTableName'[Product] = "SAAS", "SAAS",
BLANK()
)

 

Anonymous
Not applicable

Hi @Anupal ,

 

You can apply the following formula to conditional formatting, see below:

M_ =
SWITCH (
    SELECTEDVALUE ( 'Table'[Product] ),
    "END POINTS", "Yellow",
    "SAAS", "green"
)

vkongfanfmsft_0-1712299561097.png

vkongfanfmsft_1-1712299611398.png

 

Best Regards,
Adamk Kong

 

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

Joe_Barry
Super User
Super User

Hi @Anupal 

 

Highlight the visual and go to the Formatting section. Look for Columns, here you will find a number of different formmating options and one of them is background.

 

You can change the colur of individual columns here. Just change the one you wnat to the colur you want.

 

Joe

 

If you found my answer helpful and it solved your issue, please accept as solution




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.