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
PhilCh
Frequent Visitor

Table visualisation, color lines

Hello,

Is it possible to color lines of a table visualisation to distinguish category.

The rule would be "color the lines of the same category with a random color"

We find the category in a column but it can change at every refresh of the database.

I've already ordered by category but it's not clear enough that they are grouped together

Thank you for your help

 

2 REPLIES 2
amitchandak
Super User
Super User

@PhilCh , I am not sure about line, but you should be able color background using color measure and conditional background formatting

 

example

 

Measure =
Switch(true(),
max(Table[Column]) = "R1" , "Red" ,
max(Table[Column]) = "R2" , "Green" ,
max(Table[Column]) = "R3" , "Pink "
)

 

 

use in conditional formatting using field value option

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

Hello @amitchandak ,

Thank you for trying to help me.

First when I go to conditional background formatting using field value I have the windows below, not a field for DAX.

Second, I m not sure I understund your code as I told you I don't know the categories and how many they are, it changes at every refhresh of the database.

I can only specify I want a different color for every distinct category

PhilCh_0-1675439754344.png

 

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.