Link to home
Create AccountLog in
Microsoft Excel

Microsoft Excel

--

Questions

--

Followers

Top Experts

Avatar of shacho
shacho

can't change axis number format chart
I'm trying to change the way Excel displays dates in my x axis on a chart.
Sure looks like you can do it from here.
But it doesn't work.
Why?
Capture.PNG

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Rgonzo1971Rgonzo1971

HI,

Have you selected the right axis?

Are your values text or dates?

Or could you send a dummy

Regards

Hello,

check that the data in the source table is really dates, not dates that look like text.  The X axis labels seem to be in the format yyyy/mm/dd, which is a quite unusual format for a default date. Therefore, the data is most likely text.

You can convert it to a date with a formula. Try

=Datevalue(A1)

If that returns a number like 41697, format the cell to your short date format.

If Datevalue() does not recognize the date, you can use this formula:

=DATE(LEFT(A1,4),MID(A1,6,2),RIGHT(A1,2))

Copy down your table. Then copy the results and use Paste Special > Values to paste over the original date (text) data.

cheers, teylyn

Avatar of shachoshacho

ASKER

Yep - they're definitely dates...

? typename(activecell.Value)
Date

I tried this on other fields as well with numerical values.  Can't change those either.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


SOLUTION
Avatar of Rory ArchibaldRory Archibald🇬🇧

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of shachoshacho

ASKER

Didn't even know that was an option.
But alas, changing it to a "Date axis" does not solve the problem.
Are you able to get date fields to work this way in a chart?

User generated imageUser generated imageUser generated image

You say you cannot format any other number either?  Could you possibly post the file for inspection?

Create a copy of the file, replace confidential data with dummy data. Leave the dates as is.

Avatar of shachoshacho

ASKER

Fair enough.

OK - here's a fresh file with two tables.
I've formatted the columns in the source and the pivots each a different way.
The style you see in the chart right now is the number format that was on the data in the source columns when I built the tables.
Any subsequent changes do not get reflected on refresh.
Also, if I try to change the number settings in the axis properties pane, the settings don't stick.
As soon as I put the focus back on the sheet, any changes to the settings vanish.
Changing the axis type to "Date" also has no effect.

Book2.xlsx

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of shachoshacho

ASKER

My first thought was - great, problem solved.
My second thought.... it can't be this easy - I would have figured it out.
Alas, it's not this easy.  Take a look at this image.
This is from the original file.
The number format button doesn't appear in the dialog.
Not sure if it's relevant, but the source data for this pivot is a "table" range (formerly known as a "list") on a different sheet (not from the data model).
User generated image

Again, I would like to see the file. The problem does not occur in your 2.9 MB sample file with 29,000 rows of data.

In your original question you did not mention that it was a pivot chart. But that was the key to the solution.

Maybe you are forgetting to mention some other important factors here as well.

Create a copy of the file. Reduce the original data to a few hundred rows. PLEASE, there is NO NEED TO POST 30,000 ROWS of data. Replace all text with "dummy", for all I care. Then the numbers can stay as they are and you don't have to manipulate them. Post that file.

Avatar of shachoshacho

ASKER

Perhaps.  I did not expect it mattered whether it was a pivot chart or not, but you may be on to something.  I'll post the file in a few minutes.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


ASKER CERTIFIED SOLUTION
Avatar of shachoshacho

ASKER

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of shachoshacho

ASKER

Solved problem
Microsoft Excel

Microsoft Excel

--

Questions

--

Followers

Top Experts

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.