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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
bellspartan23
Frequent Visitor

Weekly Changes to Column Headers (Date Field)

Hello,

 

I'm still trying to get more comfortable in Power Query but hoping there is an easy solution for what I'm trying to do. I'm currently working with a few files where the formatting is a bit different. The fields that include the "date" are displayed as column headers and the products are displayed as rows (image below).

 

bellspartan23_0-1699486432590.png

In order to clean this up, I unpivoted the date headers so the dates would be displayed alongside the products in the rows. This has been working great so far. The challenge is that each time the file is pulled it's only limited to a certain # of historical weeks, which means column headers will keep getting removed and new headers will be added (consistently 104 weeks of data).

 

Is there a simple way to manage this in Power Query so that I won't get errors week over week? I can send screenshots. I'm not sure how others have handled this so any assistance would be great! Thanks!

 

4 REPLIES 4
bellspartan23
Frequent Visitor

Thank you! I definitely overlooked that. Figured there was a simple solution. Appreciate the quick help here!

j_ocean
Helper V
Helper V

Select non-dated columns, click "unpivot other columns" in the transform tab. 

wdx223_Daniel
Super User
Super User

find the step that using the hard code of column names

replace those hard code names to Table.ColumnNames(PreviousStepName)

AlienSx
Super User
Super User

Hello, @bellspartan23 use 

Table.UnpivotOtherColumns

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