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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ironboy0418
Helper II
Helper II

How to automatically change the data values color?

How can we change the data values color in a clustered bar chart when it was overlapped with the graph itself? Please see below example:

 

ironboy0418_0-1678408210991.png

 

1 ACCEPTED SOLUTION

There's currently no option to do that, but it is possible to set the values to only inside / outside if you need.

 

PiEye_0-1678454525481.png

 

The other alternative I found is a work-around. It's possible to format the colour of the data labels conditionally... but this point in time, I can't apply the condition of whether the point is inside or outside the bar.

 

Instead, I was able to split my measure into two - "small" values and "big" value

s and create a chart with them both. 

I can then format the position of the data labels on each separately.

 

Measures used in the chart:

m1m2 big bars = if(abs([m1/m2%])>=4,[m1/m2%])
m1m2 small bars = if(abs([m1/m2%])<4,[m1/m2%])

 

Data Label Settings:

PiEye_5-1678455094301.pngPiEye_4-1678455069206.png

 

 

Resulting chart:

PiEye_6-1678455139992.png

 

 

HTH 

 

Pi

 

 

View solution in original post

5 REPLIES 5
ironboy0418
Helper II
Helper II

@PiEye Thank you for this!

You're welcome! Please remember to mark whichever answer helped as a solution 🙂

PiEye
Resolver II
Resolver II

Hi @ironboy0418 

 

The setting to change the datavalues is under "Data Labels" and "Values"

 

PiEye_0-1678445206155.png

PiEye_1-1678445294497.png

 

 

Pi

Thank you @PiEye Is it possible to set it to be dynamic? To change to white if the graph overlaps with the datavalues?

There's currently no option to do that, but it is possible to set the values to only inside / outside if you need.

 

PiEye_0-1678454525481.png

 

The other alternative I found is a work-around. It's possible to format the colour of the data labels conditionally... but this point in time, I can't apply the condition of whether the point is inside or outside the bar.

 

Instead, I was able to split my measure into two - "small" values and "big" value

s and create a chart with them both. 

I can then format the position of the data labels on each separately.

 

Measures used in the chart:

m1m2 big bars = if(abs([m1/m2%])>=4,[m1/m2%])
m1m2 small bars = if(abs([m1/m2%])<4,[m1/m2%])

 

Data Label Settings:

PiEye_5-1678455094301.pngPiEye_4-1678455069206.png

 

 

Resulting chart:

PiEye_6-1678455139992.png

 

 

HTH 

 

Pi

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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