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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.