Forum Discussion

baptiste23's avatar
baptiste23
Frequent Visitor
6 years ago
Solved

Transforming Multiple Header file

Dear Power Bi Community   I am currently trying to connect Power BI to an excel file which has multiple columns header and I can't manage to transform the file properly to be able to get the best o...
  • camargos88's avatar
    camargos88
    6 years ago

    Hi baptiste23 ,

     

    The code:

    Table.Transpose(Table.CombineColumns(Table.Transpose(Table.FirstN(#"Filtered Rows", 2)),{"Column1", "Column2"},Combiner.CombineTextByDelimiter(" - ", QuoteStyle.None),"Merged")),

     

    Merges the 2 first rows in one, so you can handle the headers.

     

    the code "Table.Skip(#"Filtered Rows", 2)" skips the first 2 rows (they are handled on the code above).

     

    Table.Combine just appends them.