none
PowerQuery - Pivot function

    Question

  • Is it possible to use the Table.Pivot function in M? Where did this function gone in the last release ?

    tnks in advance

    Wednesday, October 30, 2013 11:43 PM

Answers

All replies

  • Table.Pivot still exists. Here's an example M program that shows its use:

    let
        Source= Table.FromRows({
                {"US", "United States", "male", 20},
                {"US", "United States", "female", 30},
                {"US", "United States", "total", 50},
                {"EU", "Europe", "male", 10},
                {"EU", "Europe", "female", 15},
                {"EU", "Europe", "total", 25}},
            {"Code", "Region", "Sex", "Value"}),
        Pivoted = Table.Pivot(Source, {"male", "female", "total"}, "Sex", "Value", List.Sum)
    in
        Pivoted

    There is currently no UI for the pivot function.
    Thursday, October 31, 2013 6:39 PM
    Moderator
  • Table.Pivot doesn't seem to work for me anymore as well.

    I'm using version 1.5.3296.1161

    Friday, November 01, 2013 12:06 PM
  • Table.Pivot was added after v1.5, into our preview v2 releases. Please update to the latest preview version (2.8.3443.101), available in the download center.

    Thanks,

    Theresa

    Saturday, November 02, 2013 2:42 AM
    Owner
  • Thanks Theresa - it works for me now using the latest preview version.
    Saturday, November 02, 2013 11:24 AM