Forum Discussion
Vetri_BI
2 years agoFrequent Visitor
perform a simple matrix addition between two tables using power query
for my business requirement i need to add two matrix. and get a resultant matrix. i know how to do it if the the number of column is small and manually entering the columns. but for my case the numb...
- 2 years ago
Hi
= Table.FromColumns(
List.Transform(
List.Zip(
{Table.ToColumns(MatrixA),
Table.ToColumns(MatrixB)}),
each List.Transform(
List.Zip({_{0},_{1}}),
List.Sum)
)
)Stéphane
Vetri_BI
2 years agoFrequent Visitor
Here's some power query for the two tables. that will save some time,
A = Table.FromRows(
{
{1, 2}
{3, 4}
}),
B = Table.FromRows(
{
{5, 6},
{7, 8}
}),
Addition = (table1 , table2) => ....Need Help here....
resultMatrix = Addition(A,B)
The below is the expected result.
resultMatrix = Table.FromRows(
{
{6, 8},
{10, 12}
})