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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.