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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
df123445
Helper I
Helper I

different row colors depending on a specific column value

I have a table with a bunch of rows and I would like to highlight some of them with a different color, the condition should be set

by a column that is not shown in the table.

 

example, I have this data:

Line 1aaalevel 1
LIne 2bbb

level 1

LIne 3cccLevel 2
LIne 4dddLevel 3

 

The table should show the following:

LIne 1aaa
Line 2bbb
LIne 3ccc
Line 4ddd

 

With lines 1 and 2 in a different color (due to paramenter "Level 1")

 

 

Anyone knows if it's feasible?

 

Many thanks in advance 

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @df123445 

Yes, you don't need to have a column of condition on your visual.

Ritaf1983_0-1690514785858.png

Link to demo file 

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

View solution in original post

Hi @df123445 

1. You can create a measure for the desired legend :

Ritaf1983_0-1690565488271.png

circles are from here :

https://getemoji.com/assets/#objects

(just choose these you need and copy and paste them into the measure)

 

2. Add "I" or another button to your table:

Ritaf1983_1-1690565695913.pngRitaf1983_2-1690565733257.png

3. Add a tooltip to the button with your legend measure

Ritaf1983_3-1690566017942.pngRitaf1983_4-1690566078771.png

result :

Ritaf1983_5-1690566118294.png

You can group this "button" with the table

Ritaf1983_6-1690566189162.png

The demo file is also updated.

Link to the demo file 

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

 

 

View solution in original post

4 REPLIES 4
Ritaf1983
Super User
Super User

Hi @df123445 

Yes, you don't need to have a column of condition on your visual.

Ritaf1983_0-1690514785858.png

Link to demo file 

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

Fantastic, many thanks indeed.

 

Do you know if there's a way to add some text inside the table box in order 2 explain what each color means?

 

In that example would be something like 

"red = 1"

"blue = 2"

 

Ideally showing a little box with the color.

 

Many thanks

 

 

 

 

 

Hi @df123445 

1. You can create a measure for the desired legend :

Ritaf1983_0-1690565488271.png

circles are from here :

https://getemoji.com/assets/#objects

(just choose these you need and copy and paste them into the measure)

 

2. Add "I" or another button to your table:

Ritaf1983_1-1690565695913.pngRitaf1983_2-1690565733257.png

3. Add a tooltip to the button with your legend measure

Ritaf1983_3-1690566017942.pngRitaf1983_4-1690566078771.png

result :

Ritaf1983_5-1690566118294.png

You can group this "button" with the table

Ritaf1983_6-1690566189162.png

The demo file is also updated.

Link to the demo file 

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

 

 

Glad to help and yes.

I explained in other discussion include demo. Will attach a liink later ( not near computer now)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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