Forum Discussion

GavinR87's avatar
GavinR87
Icon for Helper II rankHelper II
6 years ago
Solved

Change from C drive to SharePoint folder

Hi all,   I have made a Power BI report containing a lot of data that is saved in a SharePoint site folder.   What I have done is synced the SharePoint site to my OneDrive, and used the folder op...
  • mwimberger's avatar
    mwimberger
    6 years ago

    Hi GavinR87 

     

    The next step will load up all your CSV's together 

    - In the Power Query Editor, on the "Add Column" tab choose " Custom Column"

    Next step is to remove all the other columns except the custom one you just created, by right clicking on the custom column and choose remove others:

     

     

     

    Then you need to expand the custom column by clicking the expand button on the top right of the column :

    And then the ( possibly ) final step is to promote headers by clickling on Transform: Use first row as headers:

     

    Now you will have the column headings that are in your CSV files as headings in your table and you can do all the other transforms you need.

     

    PS: When I  mentioned copying the code over - it is using the Advanced Editor - that you may not have used before. As you become more versed in Power Query you will start relying on the Advanced Editor to copy out code and reuse in other situtations as you can then tweak it and adjust to your needs: This is where it is located in Power Query - there are two ways to get to it:

     

     

     

    You will now see the M code that has been translated from all the mouse clicks you performed:

     

    I hope this provides more clarity on the steps I provided in the first answer. Sometime screen shots is a better way to guide one through the process. 

     

    Also Ruth from  Curbal has a great video on this on Youtube:

    A cleaner, better and faster way to bulk import files in Power BI 

     

    Have a great weekend!

     

    Cheers

     

    Manfred