Forum Discussion

stej's avatar
stej
Frequent Visitor
9 years ago
Solved

Why text is changed even when parsed as text

I try to parse IIS log files. The log files have this structure:      I load the files from folder, so I combine the files like this     I select "space" as separator, the line is par...
  • Vvelarde's avatar
    Vvelarde
    9 years ago

    stej

     

    After you Apply the Combine Binaries. In Queries Panel you will find a Folder Name Sample Query and inside of this a Query with the Name Transform Sample Binary From "Your Folder". Select this and go to Advance Editor and change the type date to text.

     

     

     

  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi stej,

     

    You can try to use below formula which used to loop the specified folder and combine the file to one table.

     

    let
        LoadCSVFileAndCombine= (FilePath as text) as table => 
        let
            Source = Folder.Files(FilePath),
            #"Filtered Rows" = Table.SelectRows(Source, each [Extension] = ".csv"),
            Custom = Table.SelectColumns(Table.AddColumn(#"Filtered Rows", "Custom", each Csv.Document([Content])),"Custom"),
            Combine= Table.Combine(Custom[Custom])
    in
        Combine
    in 
        LoadCSVFileAndCombine

     

    Use steps:

    1. Open query editor

    2. Add blank query.

    3. Open the advanced editor.

    4. Paste above formula.

    5. Use folder path to invoke above function.

     

    Regards,

    Xiaoxin Sheng