Dear community users,
I am trying to find a way to group by my columns with a specific formula but I coudn't do it. Basically, I would like to go from a table like this:
3
x1
3
a
4
x2
3
b
5
x3
3
c
6
x4
3
d
7
x5
4
e
8
x6
4
f
9
x7
4
g
10
x8
4
h
11
x...
4
i
12
4
j
13
4
k
14
5
l
15
5
m
16
5
n
to a table like this:
3
x1
mean(x1/a;x1/b;x1/c;x1/d)
4
x2
mean(x2/e;x2/f;x2/g;x2/h;x2/i;x2/j;x2/k)
5
x3
mean(x3/l;x3/m;x1/n)
6
x4
.......
Thank you for your help,
CO,
rchar01
October 18, 2017, 10:46am
2
You can use:
- math formula node for each row = x1/a and so on
- group by node: groups: 3;4;5 and aggregation: mean (math formula result)
Is this the solution you were looking for?
Robert
ChakibO
October 19, 2017, 10:28am
3
Robert,
The problem is that the 2nd column has less rows than the 4th column. - math formula node for each row = x1/a and so on would give me col2/col4 and I will not have x1/b, x1/c ,x1/d,...
I hope I was clear enough.
Thank you for your help,
Chakib,
ChakibO
October 19, 2017, 10:29am
4
Robert,
The problem is that the 2nd column has less rows than the 4th column. - math formula node for each row = x1/a and so on would give me col2/col4 and I will not have x1/b, x1/c ,x1/d,...
I hope I was clear enough.
Thank you for your help,
Chakib,
I attached the solution (numerical input).
Please verify if the result is correct.
3
x1
mean(x1/a;x1/b;x1/c;x1/d)
4
x2
mean(x2/e;x2/f;x2/g;x2/h;x2/i;x2/j;x2/k)
Robert
Thank you Robert, it works wery well,
Best regards,
CO,