Hi All,
I am trying to sum a column without grouping.I need the summation as a single value so that i can use that as variable in calculation.Please help me out.
Thanks in advance.
Summation in transformer stage
Moderators: chulett, rschirm, roy
Re: Summation in transformer stage
stage variable will help............
stage variable = stage variable + input column value
stage variable = stage variable + input column value
-
- Premium Member
- Posts: 457
- Joined: Tue Sep 25, 2007 4:05 pm
Re: Summation in transformer stage
Yeah, this should work. Don't forget to initialize the stage variable to whatever value you want (ex. '0').sachin1 wrote:stage variable will help............
stage variable = stage variable + input column value
Vivek Gadwal
Experience is what you get when you didn't get what you wanted
Experience is what you get when you didn't get what you wanted
Re: Summation in transformer stage
Hi Sachin,sachin1 wrote:stage variable will help............
stage variable = stage variable + input column value
Sorry i did not get u.For example if Quantity is a column then i want sum(Quantity) as a single value irrespective of the other columns.
Thanks
aj
Re: Summation in transformer stage
hello dear in stage variable palette define one variable for example sum_quant, in derivation put sum_quant + input_column_name.jani wrote:Hi Sachin,sachin1 wrote:stage variable will help............
stage variable = stage variable + input column value
Sorry i did not get u.For example if Quantity is a column then i want sum(Quantity) as a single value irrespective of the other columns.
Thanks
in transformer put derivation for column Quantity as stage variable.
Derivation column name
sum_quant Quantity.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You're all crazy! Use an Aggregator stage to sum the column. Specify no grouping columns. It will use no memory (apart from the actual running sum) and be very fast. And it will require no "programming".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.