cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
admin11
Post Prodigy
Post Prodigy

How to give different color for Group Type ?

Hi All

I like to create color for whole row.

admin11_0-1621049056576.png

My PBI file :-

https://www.dropbox.com/s/l8yfe84nnblk6oq/PBT_V2021_400%20GL_TI.pbix?dl=0

 

Paul

 

1 ACCEPTED SOLUTION
HashamNiaz
Impactful Individual
Impactful Individual

Hi @admin11 !

 

You can create a new cloumn [Group_Type_Color] in your model using below DAX which can be used for Coditional Formatting;

 

Group_Type_Color = SWITCH ( TRUE(),
                    'Group TYPE'[GROUP_TYPE] = "G9", "Green",
                    'Group TYPE'[GROUP_TYPE] = "G11", "Yellow",
                    'Group TYPE'[GROUP_TYPE] = "G13", "Blue",
                    "")

 

Now you can go to condtional formatting, background color -> On -> Advanced control;

 

CFormat1CFormat1CFormat2CFormat2CFormat3CFormat3

 

Regards,

Hasham

View solution in original post

3 REPLIES 3
HashamNiaz
Impactful Individual
Impactful Individual

Hi @admin11 !

 

You can use condtional formatting option to set background color property based on dynamic condition. You can use below article for refrence how to add conditional formatting. You need to set this background property for each column in table.

 

Use conditional formatting in tables 

 

Regards,

Hasham

HashamNiaz
Impactful Individual
Impactful Individual

Hi @admin11 !

 

You can create a new cloumn [Group_Type_Color] in your model using below DAX which can be used for Coditional Formatting;

 

Group_Type_Color = SWITCH ( TRUE(),
                    'Group TYPE'[GROUP_TYPE] = "G9", "Green",
                    'Group TYPE'[GROUP_TYPE] = "G11", "Yellow",
                    'Group TYPE'[GROUP_TYPE] = "G13", "Blue",
                    "")

 

Now you can go to condtional formatting, background color -> On -> Advanced control;

 

CFormat1CFormat1CFormat2CFormat2CFormat3CFormat3

 

Regards,

Hasham

View solution in original post

@HashamNiaz 

Thank you , it work

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors