Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to get result output column using some auto generate formulae in Expression object.
Inline * load
[A,Output
A1,A1/1
A2,(A1+A2/2
A3,(A1+A2+A3)/3
A4,(A2+A3+A4)/3
A5,(A3+A4+A4)/3
nd so on...
];
Help out of this ...
Hi Sunil,
How many different combinations will you get?
if its just a few then you can simply do this:
TEMP:
[A,Output
A1,A1/1
A2,(A1+A2/2
A3,(A1+A2+A3)/3
A4,(A2+A3+A4)/3
A5,(A3+A4+A4)/3
nd so on...
];
DATA:
NOCONCATENATE
LOAD
if(A = 'A1', (A1) / 1, if(A = 'A2', (A1 + A2) / 2, if(A = 'A3', (A1 + A2 + A3) / 3))) etc etc.
RESIDENT TEMP;
DROP TABLE TEMP;
Regards,
Marius
Give some more lines of expected output, so that a rule could be formed(generalize).
Hi tresesco,
Inline * load
[A,Output
A1,A1/1
A2,(A1+A2/2
A3,(A1+A2+A3)/3
A4,(A2+A3+A4)/3
A5,(A3+A4+A5)/3
];
With same as above
Inline * load[
A,Outut
1,
12
13,
15,
16,
];
give me output of A expression .
Hi maricus,
This is not fair idea to do.Need auto generated formulate to get same.