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.
Hey there,
I tried to create the report to catch the latest 30 days excel file, which is extracted out of the other planning system. Givne that, individual file will have the name about when to extract. It causes the problem to rename the header after I use the first row as a header. Since the header is change (since the file name which is using as a header is keeping refresh), BI cannot handle that situation. (for example, on 9/15/23, my header will be 8/16/23; on 9/16/23, my header will be 8/17/23) (see below)
So just check whether there is any work around, so BI can always rename the header from that file name to one specfic name such as file, etc. Any thoughts?
Solved! Go to Solution.
Hey all, thanks. I just figured it out. In this case, I can use the create the conditional column to avoide that issue. Anyway, thank you though.
@naoyixue1 you will replace the previous step with the previous step name in your M: from your screenshot it looks like it is promoted headers1, so it will be:
#"Renamed Columns" = Table.RenameColumns(#"Promoted Headers1",{{Table.ColumnNames(#"Promoted Headers1"){0}, "New Column Name"}})
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hey all, thanks. I just figured it out. In this case, I can use the create the conditional column to avoide that issue. Anyway, thank you though.
How about deleting the Source.name column first, then promoting headers? Then if you need some part of the info in the Source.name column, create a new column and populate it with the needed information.
@naoyixue1 you can add a step to rename the column dynamically:
#"Renamed Columns" = Table.RenameColumns(<Previous Step>,{{Table.ColumnNames(<Previous Step>){0}, "New Column Name"}})
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k I'm guessing something is wrong about my M code, would you help to take a look into it? thanks!
Hey there,
Just found it also causes the error when I try to uppivot the tabe, because that step is based on the header name. Not sure whether there is a workaround or I should totally do the other ways to pull the last 30 days file in one folder. Anyway, thanks!
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 |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
81 | |
67 | |
62 | |
46 | |
45 |