locked
How to : Unpivot Other Columns

    Question

  • Hello,

    I am searching a way to unpivot all my columns execpt the first one. Because the source files will grown in the future with other columns.

    So, i try to find a way to unpivot all the columns (except the first one) without naming each columns.

    I search in the Data Explorer Formula Language Specification without success. 

    Does someone have an idea ?

    Thanks

    Simon P.

    Wednesday, June 12, 2013 2:15 PM

Answers

  • Hi Simon,

    You can replace the hard coded columns list in the formula with:

    List.Skip(Table.ColumnNames(Source)

    So it'll look something like this:

    = Table.Unpivot(Source,List.Skip(Table.ColumnNames(Source), 1),"Attribute","Value")

    Regards,

    PQ


    Peter Q. http://blogs.msdn.com/peter_qian


    Peter Q. http://blogs.msdn.com/peter_qian

    Thursday, June 13, 2013 5:56 AM