Search notes:

Power Query M formula language standard library: Table.Unpivot

let
   pivotData = #table(
     { "fruit" ,"min price", "max price" },
  //    -----    ---------    ---------
     {{"orange",      2.58 ,       2.73  },
      {"apple" ,      1.82 ,       2.07  },
      {"pear"  ,      1.33 ,       1.42  }}
   ),
   pivotDataTyped = Table.TransformColumnTypes(pivotData, {
             {"fruit"    , type text  },
             {"min price", type number},
             {"max price", type number}
   }),
   unpivot= Table.Unpivot(
       pivotData,
        {"min price", "max price"},
         "label",
         "price"
       )
in
   unpivot
This Power Query program produces:
fruit       label          price
orange      min price       2.58
orange      max price       2.73
apple       min price       1.82
apple       max price       2.07
pear        min price       1.33
pear        max price       1.42

See also

The Power Query standard library

Index