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

manekankit

Board Regular
Joined
Feb 1, 2019
Messages
71
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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,215,073
Messages
6,122,974
Members
449,095
Latest member
Mr Hughes

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