Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Get data from folder, remove rows from each file in folder

I'm trying to do something with PowerBI that I'm fairly certain is possible, but I'm getting an Expression.Error, so I think I'm doing something wrong.

 

I'm getting data from a folder.  It can contain an arbitrary number of files (but typically 40-100). All of the files in the folder are .xlsx files with identical formatting, though the data they contain is different.  For each file, I want to remove the first row (it's junk) and use the second row as headers.  Then I want to combine all of the data into one dataset on which I can do my normal PowerBI stuff.

 

I've been trying Get Data -> Folder -> Remove Top Rows (1) -> Use First Row as Headers.  But, as mentioned above, this just gets me an error message.  What am I doing wrong?  What should I do?

 

Thanks!

  • Hi , Anonymous 

     

    Please recheck you steps:

    1.Get data from folder

    2.Select “Transform Sample File”  and select   ‘Use First Row as Headers’   

    If success , the transform Sample File will be as shown below:

    3.Maybe there will be an error like this:

    Please  delete the steps of “change type”

    4.The final queries will be as shown below  and please click “Close &Apply”  

    Here’s a sample I made:

    Url: https://wicren-my.sharepoint.com/:f:/g/personal/michael_wicren_onmicrosoft_com/EsEeylz5jFtPv5n8uzVa2ikBi7MtEB7P_e5hbmF3V0VD3w?e=8qE6ba

     

    If it doesn't meet your requirement, kindly share your sample data and expected result if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi , Anonymous 

     

    Please recheck you steps:

    1.Get data from folder

    2.Select “Transform Sample File”  and select   ‘Use First Row as Headers’   

    If success , the transform Sample File will be as shown below:

    3.Maybe there will be an error like this:

    Please  delete the steps of “change type”

    4.The final queries will be as shown below  and please click “Close &Apply”  

    Here’s a sample I made:

    Url: https://wicren-my.sharepoint.com/:f:/g/personal/michael_wicren_onmicrosoft_com/EsEeylz5jFtPv5n8uzVa2ikBi7MtEB7P_e5hbmF3V0VD3w?e=8qE6ba

     

    If it doesn't meet your requirement, kindly share your sample data and expected result if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.