Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
ELToninio
Frequent Visitor

Columns headers that change every month

Hello,

 

I am facing an issue where I extract data on a monthly basis where the column names change every month. For example my columns are going to be Cash Cumulated (04/2024) Cash YTD (04/2024) Sales Cumulated (04/2024) Sales YTD (04/2025) etc. (+30 columns)

and because I promote this first row as header and do a lot of data cleaning after ward where I end up merging request together link on column names it create a lot of issues.

 

Indeed, each month the columns names change because the date change, so 04/2024 will change to 05/2024.

 

I have the same problem for other data extractions where column names are based on the last 12 month, where 1 column is 1 month but therefore it rolls each month by incrementing +1 month on each column.

 

Do you have any tips on how I can by pass this problem ? I tried to fix it by unpivoting columns but it doesn't work.

 

Thanks a lot

2 REPLIES 2
Anonymous
Not applicable

Hi @ELToninio ,

@Greg_Deckler Thanks for your concern about this case!
Have you solved your problem? If not, can you explain to me how your data is changed when months are changed? Do you just overwrite the previous month's data, or do you just add this month's data to the original table?
The operations you perform in Power Query are memorized, i.e., when your original data changes, all the data cleansing, data transformations, etc. you have previously performed will be reapplied to the new data. 
If your data is directly overwriting the previous month's data when the month changes, then you just need to refresh the data source and Power Query will automatically promote the first row as header.
If your new data is new, make sure that the new data is added above the old data and not below it, so that after refreshing the data source, Power Query will promote the row as header of the new data.

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@ELToninio Don't promote your headers until the end and work with Column1, Column2, Column3, etc. As long as the positions remain the same you should be fine.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors