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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.