Page 1 of 1

Counting rows and summing columns in same aggregator stage

Posted: Fri Oct 29, 2010 2:45 am
by manuel.gomez
I am sure this must be something already discussed, but I just cant find any posts in the forum.

Is not possible to count rows and sum columns in the same Aggregator stage?

Due to Aggregation Type property, you always have to choose between 'Calculation' (where there is no calculation for counting, the most similar I found was Weighting column) and 'Count Rows'

Is not possible to do both, as you do in typical SQL queries?
select count(*), sum(col1), sum(col2) from table
Thanks a lot!

Posted: Fri Oct 29, 2010 2:55 am
by ArndW
It would seem not, I just played around with the aggregator stage and couldn't find a way of doing with just one stage. Perhaps someone else has found another solution.

Posted: Fri Oct 29, 2010 2:56 am
by yimwai
add a column before with value "1" , then sum

Posted: Fri Oct 29, 2010 3:02 am
by ArndW
yimwai - that's a simple and elegant solution :)

Posted: Fri Oct 29, 2010 4:51 am
by manuel.gomez
ArndW wrote:yimwai - that's a simple and elegant solution :)
I agree, I guess I will do this!