Forum Discussion
DBricklin1979
4 years agoRegular Visitor
How can i summerize all values from one column in Power Query?
Hi, I cannot figure out how to summerize all values from one column (calculate the total) and add them to a new column ("total") using Power Query. In Excel I am used to simply use the "=SUM" for...
- Anonymous4 years ago
HI DBricklin1979 - Sorry my mistake, I was thinking of the syntax for a Group By function. You need to replace the "_" with the table name from the previous step. It would look like this:
= Table.AddColumn(#"Andrad typ", "Anpassad", each List.Sum( #"Andres typ"[Value] ) )
Anonymous
4 years agoNot applicable
Hi DBricklin1979 - you need to use the following formula in a Custom Column in Power Query.
List.Sum( _[Value] )
Note the key is the _. This will load the entire table column. Where have [Value] part only will include the current row value.
However, it may be better to leave this type of calculation until DAX/Data Model stage as it will slow the import of data.
DBricklin1979
4 years agoRegular Visitor
Thanks Anonymous ! Unfortunantly it did not work for me. I get the error below:
It says: "Error: Cannot convert value 10 to the type list"