The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance 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.
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
79 | |
57 | |
48 | |
48 |