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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.