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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

COLOR CAPTION

To set the color of the columns, I directed a DAX, which is working.
However, in the caption, the color is not the same as the column.
The column is black, but in the caption it is blue.
I'd like to know why.

KauanDegenhart_0-1730384161022.png

KauanDegenhart_1-1730384178048.png

 

3 REPLIES 3
adudani
Memorable Member
Memorable Member

hi @Anonymous ,

 

If you'd like to change the whole series color to a single column, conditional formatting is not required. 

 

In this case, you could just select the series under "format -> column -> selected series -> bar color".

 

conditional formatting is used to highlight the specific condition/ outliers in the trend specifically.

 

The legend reflects the color of the column / series.

 

Hope this helps.

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash
Anonymous
Not applicable

Yes I understand, but in my case, I need the conditional formatting, as I have 4 different situations, where the color should change, and I don't have those situations in one column.
Because of this, I need to use conditional formatting.
The rule is:
ID=1 and Status=F
ID=1 and Status=P
ID=2 and Status=F
ID=1 and Status=P

DAX:

CorPreenchimento_K =

SWITCH(

    TRUE(),

    SELECTEDVALUE('MODELO DADOS'[ID_EMP]) = 1 && SELECTEDVALUE('MODELO DADOS'[STATUS]) = "F", "#F29100",

    SELECTEDVALUE('MODELO DADOS'[ID_EMP]) = 1 && SELECTEDVALUE('MODELO DADOS'[STATUS]) = "P", "#000000",

    SELECTEDVALUE('MODELO DADOS'[ID_EMP]) = 2 && SELECTEDVALUE('MODELO DADOS'[STATUS]) = "F", "#BB0000",

    SELECTEDVALUE('MODELO DADOS'[ID_EMP]) = 2 && SELECTEDVALUE('MODELO DADOS'[STATUS]) = "P", "#000000",

    "#000000"

)

I have both filters on the screen, according to the filters the color should change.
The DAX is working correctly, the colors are changing, but in the legend it does not change, it remains blue.

 



KauanDegenhart_0-1730397362748.png

Anonymous
Not applicable

Hi @Anonymous ,

 

As Avinash mentioned, conditional formatting is used to highlight specific conditions/outliers in a trend. 

This means that usually in a category the conditional format may have more than one color, but a category can only have one color, which is why it is difficult for the color of the legend to change dynamically along with the color of the bar chart.

 

You can submit the idea here:

Welcome to Microsoft Fabric Ideas

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.