Forum Discussion

mrbajana's avatar
mrbajana
Helper III
5 years ago
Solved

Convert Multilple Files with Date in Columns to One DataSet

I receive every day csv files in the format with the dates in columns but I need to convert it into a base in powerquery to be able to make the reports. All files are saved in a single folder so I us...
  • v-jingzhang's avatar
    5 years ago

    Hi mrbajana 

     

    Since you are using the folder connector, when you connect to the folder and get below table, click combine icon on the Content column and select a sample file for it. We will transform the sample file in next steps.

     

    Select Transform Sample File, perform below steps:

    • Use First Row as Headers
    • Delete auto-generated Changed Type step in Applied Steps pane if any
    • Select the first two columns and unpivot other columns

    You will get the sample file like below.

     

    Then select the combined query, you will get all data in it. Remove the source name column if you don't need it.

    If you see error like 'can't find column ...', check if there is a Changed Type step in Applied Steps pane. This step will refer to columns by name which may not exist after transforming the sample file, so delete the Changed Type step. You can change column types manually after getting all data. 

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.