Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
When I export a flat data file to Excel, the headers in Excel are shifted exactly one column to the right of the from the underlying data in the columns. Here is a clip of the export file with some arrows showing the malignment:
Is there a transformation/process that can be used on a single row to push the headers over the right columns of data or is this a lost cause? There is so much else wrong with the file but I can fix those issues.
Please help, Almighty Datanaught Community!
Solved! Go to Solution.
Renaming your columns like so shoud do the job:
= Table.RenameColumns(Source, List.Select(List.Zip({Table.ColumnNames(Source), {""} & Table.ColumnNames(Source)}), each _{0} <> null))
Just replace "Source" by a reference to your table if needed.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Renaming your columns like so shoud do the job:
= Table.RenameColumns(Source, List.Select(List.Zip({Table.ColumnNames(Source), {""} & Table.ColumnNames(Source)}), each _{0} <> null))
Just replace "Source" by a reference to your table if needed.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
@ImkeF : I like where you are going here and that works to move all columns one to the right. I need to add a new small modification to my question.
How can I tweak the starting column as to where to shift? Can I add two columns or do I have to run the process twice?
This community is the best!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
6 | |
6 | |
6 | |
5 |
User | Count |
---|---|
9 | |
9 | |
8 | |
6 | |
6 |