Changing Dates as Column Names to the Month using Power Query

programsam

Board Regular
Joined
Feb 10, 2016
Messages
123
Greetings,

A bit of a noob with PQ and have a file that comes through weekly where the oldest month falls off when we enter a new month and the new month climbs in. What I'm trying to accomplish is to change the date to the MONTH NAME instead. As example, the first column in the image below would read JULY, the second would read as AUGUST, etc.

1689127515595.png
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
You can add a step using Table.TransformColumnNames like this:

Power Query:
= Table.TransformColumnNames(Source, each try Date.MonthName(Date.From(_)) otherwise _)

(this assumes that Source was the previous step)
 
Upvote 2

Forum statistics

Threads
1,223,327
Messages
6,171,487
Members
452,407
Latest member
Broken Calculator

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