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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Data Label colors based on their Position (Inside/Outside/Base/Center/End)

Hi,


I'm facing the following siutation: When I create a new PBI file from scratch with the default color theme (provided by MS) the color of the data labels are automatically chaning based on their position. In case of a bar chart that means if the data label is outside the bar it has a certain color (in my case Grey). But if the data label is inside a bar the color is white. Thus, that's quite.

 

01_Data_Labels_Auto.png02_Data_Labels_Auto_Options.png

 

But if I change the color of the data lables for once (e.g. to Red), all labels will turn to this color no matter which position they have. In some chase that makes the data labels hard to read if there are inside the bar. The same happens if I want to use a cutoms color theme. So, here is my question: Is it possible to configure a primary and a alternative color based on the position of the data label?

03_Data_Labels_Red.png04_Data_Labels_Red_Options.png


BTW there is no intentention to show the data labels always outside the bar. The Auto option is quite handy.


Thanks a lot.

Cheers,
Dom

6 REPLIES 6
Anonymous
Not applicable

The way you can work around with this is to change advanced color in current theme and keep the color of data labels as default.

 

Anonymous
Not applicable

In order to get white color in the bar. go to format->click on Format ->select Datalabel ON(By default off) -> if it is ON, go to bottom of the same session click on Revert to default. 

Now Data label should be automatically turned off. Just Turn ON. Now data label which is inside the bar should be in white color automatically. 

That's a stunning workaround, thank you! 

MFelix
Super User
Super User

Hi @Anonymous,

 

You cannot define a secondary colour, one option would be to set the background of the data label to withe (or the background colour of the chart) and when you have it inside the bar it will evidence the number when outside it will be just the number, because the background will blend.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

First things first... Happy new year!

 

Thanks @MFelix for your reponse. You're right about that it seems that you cannot define a scondary color but your suggested workaround is not what I'm looking for actually. As demostrated in the screenshot before Power BI is somehow "magically" able to handle two colors out of the box. In this case I havent (pre-)configured anything but the grey color of the bars.

01_Data_Labels_Auto.png

I reckon that there is no way of defining two colors via GUI at the moment. Thus, maybe there is a way to do it via JSON theme? That would be a question adressed to the Power BI team of Microsoft.

Hello ... could you solve this problem? I mean, understand why sometimes the lable is white inside the bar sometimes not?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.