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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
joshua3m
Frequent Visitor

PowerQuery Year Month as headers / optimzation.

Hello, 

Maybe someone will have better solution to my issue ;  

I have table in excel which I'm pulling to PowerQuery as i need unpivot it and here I have 2 issues.    

 

1. Part of the table have rolling weeks and years ; this mean that every week my headers will change and so powerquery unpivot will stop working as it will be not able to find collumns with last week header.  
Right now I have static headers which are not changing ; following unpivot i'm linking table in powerquery with another table which have correct headers but this is super slow on 2 million records.  

2. Refresh on above setup is super slow ; i have circa 3000 rows and 600 collumns which flattening is super slow ; i did try find some solution but i didn't manage find any ; would anyone recomend anything ? 

 

Thanks, 

Josh 

1 REPLY 1
AlexisOlson
Super User
Super User

1. You have the option to specify which columns to unpivot (Table.Unpivot) or which columns not to unpivot (Table.UnpivotOtherColumns). If you have a changing list of columns, then use unpivot other columns.

 

2. If the table is small enough to fit into memory, then applying Table.Buffer before unpivoting might speed things up.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.