Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      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:

       

      Error

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

       

      Thanks

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        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