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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
admin11
Memorable Member
Memorable Member

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

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
Solution Sage
Solution Sage

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

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

@HashamNiaz 

Thank you , it work

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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