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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors