Hi,
I have an array, where column 1 to 3 are descriptive, and column 4 is the value. For example:
1 1 1 a1 1 2 b1 2 1 c1 2 2 d2 1 1 e2 1 2 f2 2 1 g2 2 2 h3 1 1 i3 1 2 j3 2 1 k3 2 2 l
I want to totalize this array by column 3 descriptive value, so the result is this:
1 1 (a+b)1 2 (c+d)2 1 (e+f)2 2 (g+h)3 1 (i+j)3 2 (k+l)
I tried with accumarray using as subs columns 1 and 2, and it gives the result i Want, but in a different form:
(a+b) (c+d)(e+f) (g+h)(i+j) (k+l)
Please, have any ideas?
Best Answer