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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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