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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
cnorris3570
Helper I
Helper I

Get filename column back

in the process of setting up my template file, i believe i accidently deleted the column that had the filename of the dataset (excel) that im building it on.  Is there a way to 1.) add a column with the filename, which will be one?  it would simply populate each row since it is coming from 1 file anyway?  ive been struggling with this for awhile and do not want to have to start from scratch.  i simply want the filename so that i can create a measure for it in a label.

 

can someone tell me how to do this?  have seen several post but none seem to simply be able to do this..... just the filename and it could be the same for every row.

3 REPLIES 3
cnorris3570
Helper I
Helper I

i do have this also..... i have a query called File Location.  It list the current value - "https://test.sharepoint.com/sites/sharepoint/Manpower%20Reports/TEST.xlsx%22"

i think i am close...... i just need to get the "TEST" part.  the blue part is the TESTname of the file.

cnorris3570_0-1647280989319.png

 

cnorris3570
Helper I
Helper I

hi sir and thank you for your response.  
1.) i created a query that its current value is "https://TEST.sharepoint.com/sites/sharepoint/Manpower%20Reports"
so when i open my template, it asked me for a File Location dialog box.  I paste in the location like this:  
"https://TEST.sharepoint.com/sites/sharepoint/Manpower%20Reports/TEST.xlsx"
it then loads up the file as it should.  I just need to get label at the top left to display the File name minus the .xlsx

cnorris3570_0-1647273914534.png



hope this helps....

lbendlin
Super User
Super User

There is nothing simple about this (unless you are willing to start over).

 

What connector are you using, the Folder connector, or the Excel connector?  Can you post a sanitized version of your Power Query code?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.