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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Filename as a column

Hi all,

Hoping someone can help me! Does anyone know how to add filename as a column in Power BI? I can do it through connecting to folders but need to be able to do it by connecting to a single excel file.  Thanks 
4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

I'm not so sure what your requirement, can you please explain more clearly?

AFAIK, if you use folder connector to get data. Power bi will get whole detail information from folder files.(include folder path, filename, Extension...)

Then you can add a custom column with excel connector and merge folder path and file name to get data from specific files.

17.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi Xiaoxin,

This is a report that I will rolling out to lots of people in different countries so they will run two reports from another system with the results in Excel. I need to create a column that will show the filename as a column. They will possible save multiple reports in the folder so I need them to link to just two of them. When I use the below Custom column formula I get an error:

 

ErrorError

Is [Folder Path]&[Name] recognised functions or should i actually enter the folder path and file name in here?

 

Thanks

 

Hi @Anonymous ,

>>Is [Folder Path]&[Name] recognised functions or should i actually enter the folder path and file name in here?

Actually, they are table columns with folder path(X:\xxxxx\) and filename(xxxx.xlsx) strings.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I have the same problem as the thread creator:  I get that error message.

 

@v-shex-msftwhat do you mean by:

"Actually, they are table columns with folder path(X:\xxxxx\) and filename(xxxx.xlsx) strings."

 

Could you please elaborate?

 

Thank you very much!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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