Forum Discussion

PatrickWong's avatar
PatrickWong
Icon for Helper I rankHelper I
2 years ago
Solved

Import folder with files that has different headers and still keep the different header

I would appreciate some help here. my problem every month, I will get a excel file drop into the folder. it would contain the file name forecast-current month.xlsx in MMYYYY format like forecast-022...
  • PhilipTreacy's avatar
    2 years ago

    Hi PatrickWong 

     

    Not sure what you have in mind when you ask for it to be 'corrected'. 

     

    The best way to fix this would be to have the data sent to you in the proper format - tabular data - i.e. not using dates as column headers, but having a Date column and a Value column.

     

    But given what you have, and starting with data like this

     

     

    Right click the column header for the Description column and Unpivot other columns to give this

     

     

    Regards

     

    Phil

     

  • PhilipTreacy's avatar
    2 years ago

    Hi PatrickWong 

     

    Here's an example PBIX file

     

    You should be selecting the Description column then unpivoting other columns.  That way the 'other' column names aren't explicitly mentioned in the query so should work for all files.

     

    Regards

     

    Phil