Reply
Frequent Visitor
Posts: 2
Registered: ‎07-12-2018
Accepted Solution

Colour Table Cell by Text Value

I have created a calculated column in Power Bi Desktop in Table Visualization. The cell values in the columns contain Black, Blue and Red. I want to colour the cells based on these cell values present in the calculated column. I want Blue cell in the table to have Conditional Formating-> Background as Blue colour background and Red cell fields as Red colour background. How to solve this issue?


Accepted Solutions
Highlighted
Super User
Posts: 668
Registered: ‎11-01-2017

Re: Colour Table Cell by Text Value

[ Edited ]

 

Hi @RachitBhatnagar

 

Create a measure like this:

 

color = MAXX(Table1,IF(Table1[Product]="Green",1,IF(Table1[Product]="Yellow",2)))

 

Then apply conditional format in your column using this measure:

 

colour.JPG 

Thanks

Raj

View solution in original post


All Replies
Frequent Visitor
Posts: 2
Registered: ‎07-12-2018

Colour Cell based on Text Values in it

I have created a calculated column in Power Bi Desktop in Table Visualization. The cell values in the columns contain Black, Blue and Red. I want to colour the cells based on these cell values present in the calculated column.

I want Blue cell in the table to have Conditional Formating-> Background as Blue colour background and Red cell fields as Red colour background.

How to solve this issue?

Highlighted
Super User
Posts: 668
Registered: ‎11-01-2017

Re: Colour Table Cell by Text Value

[ Edited ]

 

Hi @RachitBhatnagar

 

Create a measure like this:

 

color = MAXX(Table1,IF(Table1[Product]="Green",1,IF(Table1[Product]="Yellow",2)))

 

Then apply conditional format in your column using this measure:

 

colour.JPG 

Thanks

Raj