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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors