Hello,
Currently have similar dataset to this:
ID_1 ID_2 ID_3 Year Value
a b c 2018 3
a b c 2017 4
a b c 2016 5
a b z 2018 5
a b z 2017 7
a b z 2016 6
Would like to calculate 3 new columns:
Column a) Mean of group based on ID_1 and ID_3
4
4
4
6
6
6
Column b) average for all values of similar groups based on ID1 ID2 ID3 but only for prior years:
Result of : (3+4+5)/3
Result of : (4+5)/2
Result of : 3
Result of : (5+7+6)/3
Result of : (7+6)/2
Result of : 6
Column c) lag = value for same id previous year
4
5
NA
7
6
NA
Thanks a lot for the help!
Btw, Knime is awesome!
Bernard