Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
@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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |