Forum Discussion

nirrobi's avatar
nirrobi
Helper V
10 years ago
Solved

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 lo...
  • Anonymous's avatar
    Anonymous
    10 years ago

    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