Add Total to Bottom of Table in Power Query using Unpivot and Pivot

Описание к видео Add Total to Bottom of Table in Power Query using Unpivot and Pivot

#power_query #powerquery

let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
T1 = Table.TransformColumnTypes(Source,{{"Text", type text}, {"Num1", Int64.Type}, {"Num2", Int64.Type}, {"Num3", Int64.Type}, {"Num4", Int64.Type}, {"Num5", Int64.Type}, {"Num6", Int64.Type}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(T1, {}, "Attribute", "Value"),
#"Pivoted Column" = T1 & Table.Pivot(#"Unpivoted Other Columns", List.Distinct(#"Unpivoted Other Columns"[Attribute]), "Attribute", "Value", each try List.Sum(_) otherwise "Total")
in
#"Pivoted Column"

Комментарии

Информация по комментариям в разработке