Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm trying to make a column that lists the source file name. In this case, I've imported an Excel file named FileName.xlsx. I don't know if there's someway I can just write some Power Query formula that will return a column with each line saying FileName. I've read dozens of messages about creating folder sources, Merging from SharePoint, that sort of thing.
I feel like there's got to be a simple way to do it.
The reason I ask is that I'm putting together a monthly financial report, and the Excel file's name has the month and year in it. So, when someone opens it, I could make a card which lists that file name.
Thank you!
Solved! Go to Solution.
For your reference.
Step 0: I use these datafiles below.
These files are in the 'DATAFOLDER' folder.
202410_DATAFILE.xlsx
202411_DATAFILE.xlsx
Step 1: I click 'Get data' icon and select 'Folder' and click 'Connect' button on Power BI Desktop.
Step 2: I click 'Browse...' Button and select 'DATAFOLDER' folder and click 'OK' button.
Step 3: I select 'Combine & Transform Data' menu.
Step 4: I select 'Sheet1' and click 'OK' button.
Step 5: I can get 'Source.Name' column automatically.
For your reference.
Step 0: I use these datafiles below.
These files are in the 'DATAFOLDER' folder.
202410_DATAFILE.xlsx
202411_DATAFILE.xlsx
Step 1: I click 'Get data' icon and select 'Folder' and click 'Connect' button on Power BI Desktop.
Step 2: I click 'Browse...' Button and select 'DATAFOLDER' folder and click 'OK' button.
Step 3: I select 'Combine & Transform Data' menu.
Step 4: I select 'Sheet1' and click 'OK' button.
Step 5: I can get 'Source.Name' column automatically.
Use the Folder (or SharePoint Folder) connector. Then you get the filename column for free.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
37 | |
31 | |
26 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |