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
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
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.

Top Solution Authors