Excel Chart - number formatting as decimal only if decimal values are available in source data

manekankit

Board Regular
Joined
Feb 1, 2019
Messages
72
Office Version
  1. 365
Platform
  1. Windows
I am having chart based on power pivot where values for all the months are updated based on slicer Selection. (E.g. Profit, Profit%.)

I am currently using this number format "#,##0_);[Red](#,##0)" for chart labels which is available by default in excel. This format hides decimal values and shows numbers in full value on the chart Label.

Profit number is not having decimal in source data as it is rounded, whereas profit% is having decimals in source data.

Now format I mentioned is ok if we want to see profit number (which is more than million) on chart labels (E.g. chart would show 15,000). However when profit% is selected on slicer, I want labels to show numbers in 2 decimal points (E.g. Chart should show 10.12).

Note: Profit values in source data is stored as 10.12 (and not 0.1012).

Above is an example, basically I am trying to report all smaller values in decimal on the labels. I can round big numbers to zero decimal in source data.

Further numbers to be formatted for million comma format and negative numbers to be shown in red within brackets.

Requesting community members to help me with this issue, or suggest if there is any workaround.



I am using office 365 for desktop on Win10.
 
Last edited:

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top