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
nirrobi
Helper V
Helper V

PowerQuery read from folder with many zip file

Hi all,

 

Is there a way to load to powerquery in powerBI folder with many zip file?

I succeed to load all the zip files but when drill done got only non read data (GIBBERISH.)

 

I succeed to load one zip file using the excellent to below link:

http://www.excelandpowerbi.com/?p=155

1 ACCEPTED SOLUTION
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

Hi @nirrobi,

Firstly, create UnzipContents function in Power BI Desktop following the instructions in this blog.

Secondly, choose "New Source -> Blank Query", open the advanced editor and paste the following code, please replace the path to your own path.

let
path = "Path\Zipfolder",
Source = Folder.Files(path),
#"Filtered Rows to only .zip" = Table.SelectRows(Source, each ([Extension] = ".zip")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows to only .zip",{"Content"}),
#"Added Custom UnzipContents" = Table.AddColumn(#"Removed Other Columns", "Custom", each UnzipContents([Content]))
in
    #"Added Custom UnzipContents"



Thanks,
Lydia Zhang

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

View solution in original post

3 REPLIES 3
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

Hi @nirrobi,

Firstly, create UnzipContents function in Power BI Desktop following the instructions in this blog.

Secondly, choose "New Source -> Blank Query", open the advanced editor and paste the following code, please replace the path to your own path.

let
path = "Path\Zipfolder",
Source = Folder.Files(path),
#"Filtered Rows to only .zip" = Table.SelectRows(Source, each ([Extension] = ".zip")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows to only .zip",{"Content"}),
#"Added Custom UnzipContents" = Table.AddColumn(#"Removed Other Columns", "Custom", each UnzipContents([Content]))
in
    #"Added Custom UnzipContents"



Thanks,
Lydia Zhang

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

Super helpful!  Thank you.

thanks a lot!!!!!!

I forgot to change the name of the queries to unzip...

 

 

 

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.