Forum Discussion
skopcak
9 years agoHelper I
Query editor - Sum of Distinct Count by column
Hello, I have tables see the attachment, can I create a new column in the table that will contain the sum of the column number? Text number RESULT: sum of column number Text1 4,2 7,...
- 9 years ago
Strange that you already have the column in your input table.
In the code below I just add a column with a slightly different name.
let Zdroj = Excel.CurrentWorkbook(){[Name="Tabulka1"]}[Content], #"Změněný typ" = Table.TransformColumnTypes(Zdroj,{{"Text", type text}, {"number", type number}, {"RESULT: sum of column number", type number}}), #"Added Custom" = Table.AddColumn(#"Změněný typ", "Sum of column number", each List.Sum(#"Změněný typ"[number])) in #"Added Custom"
MarcelBeug
9 years agoCommunity Champion
Strange that you already have the column in your input table.
In the code below I just add a column with a slightly different name.
let
Zdroj = Excel.CurrentWorkbook(){[Name="Tabulka1"]}[Content],
#"Změněný typ" = Table.TransformColumnTypes(Zdroj,{{"Text", type text}, {"number", type number}, {"RESULT: sum of column number", type number}}),
#"Added Custom" = Table.AddColumn(#"Změněný typ", "Sum of column number", each List.Sum(#"Změněný typ"[number]))
in
#"Added Custom"skopcak
9 years agoHelper I
Thank you very much, that's exactly what I needed.