Format Your Pivot Chart Dates as mmm Without Losing Sort Order

If you're looking to display dates in the "mmm" format on a data model pivot chart while maintaining chronological order, you’re not alone.

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

This is a classic case of software fighting the user on something that should be straightforward. The person who posted this problem, let's call them the original poster (OP), is doing everything right. They loaded their data into the data model via Power Query. They created a dedicated date table with the first of each month as a proper date value. They want the chart to display "mmm" (Jan, Feb, Mar) while keeping the months in chronological order. And they hit a wall. The data model offers no format option. The pivot chart ignores cell formatting. The field settings are silent on the matter. The only escape hatch was VBA.

That is not a user error. That is a design gap.

The OP's frustration is our frustration. Spreadsheet tools have spent years adding complexity to the data model layer, Power Pivot, Power Query, OLAP cubes, without giving users a consistent way to control the most basic visual output. A date axis formatted as "mmm" is not an exotic request. It is table stakes for any reporting tool. Yet here we are, watching someone resort to `ActiveSheet.PivotTables("PivotTable1").CubeFields(...).PivotFields(1).NumberFormat = "mmm"` just to make a chart show three-letter months in the right order. The solution works, but it should not require scripting.

What this tells us is that the traditional spreadsheet ecosystem still treats formatting as an afterthought in the data model context. The OP's workaround, a VBA command that targets the specific CubeField, is clever, but it is also brittle. It will break if the field name changes, if the pivot table is rebuilt, or if someone else inherits the file without the macro enabled. The better path is for the product to surface number format options directly in the field settings for OLAP-based pivot charts. That is not a feature request for a far-off release; it is a missing piece of basic functionality.

For anyone facing the same problem today, the OP's VBA line is your answer. Copy it, adjust the pivot table name and field reference, and run it after your data refreshes. It preserves sort order because the underlying date value remains intact, you are only changing the display mask. That is the right approach. But do not mistake a workaround for a solution. The real takeaway is this: when your tool forces you into VBA for a formatting task that every other modern analytics tool handles natively, it is time to question whether the tool is still serving you, or whether you are serving it.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

I'm using pivot charts to display data by month. All of my data is loaded into the data model with powerquery. I need to show the date as mmm, but also preserving the chronological sort order. So I have a table with a record for each month with the first day of the month as a date value.

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community