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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dynamic Months as Headers Help

Good morning all,

 

Hope you are all well. I'm still very new to Power Query (I'm on Excel) and I have a document which has the headers Jan - Dec to simulate a full years worth of data, however, now that i've loaded in the current times file (Jan - Aug), Power Query cannot find the months of Sep - Dec and will not proceed with the further steps. The two steps I am using that requires the dynamic months is a headers change and a value replacement from "" to "0"

 

Is there a way i can keep all the steps that have all months but negate any that are not found on the sheet? This is what i've currently got but any help would be greatly appreciated.

 

= Table.RenameColumns(Sheet1_Sheet,{{"Column1", "DealershipID"}, {"Column2", "Total"}, {"Column3", "Jan"}, {"Column4", "Feb"}, {"Column5", "Mar"}, {"Column6", "Apr"}, {"Column7", "May"}, {"Column8", "Jun"}, {"Column9", "Jul"}, {"Column10", "Aug"}, {"Column11", "Sep"}, {"Column12", "Oct"}, {"Column13", "Nov"}, {"Column14", "Dec"}})

 

Thanks in advance.

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,
Did their answer help you, if it did, you can mark their answer as a solution, if not, you can go ahead and ask your query and we can help you faster.

Best regards,
Albert He

Omid_Motamedise
Super User
Super User

see this video, 

you can find the answer to your question and another question you might face.

 

https://www.youtube.com/live/qlstBMRKRMU?si=GjOYtm3EkRtBdKXb

 


If my answer helped solve your issue, please consider marking it as the accepted solution.
adudani
Super User
Super User

hi @Anonymous 

could try either:
a. using dynamic list of column names to rename columns

b. using in the parameter of RenameCoulumns: "Missingfield.ignore"

Reference videos: 
Dynamic Column Names in Power Query (youtube.com)
Dynamically Expand All Columns from Multiple Tables in Power Query (youtube.com)

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Kudoed Authors