I have following data coming from prior transformations.
Id Unit Name NewFlag
_
1 JacuzziBox 1
2 Hummer H2 0
3 Waste dumper 0
and so on.
I want aggregate task to result 2 fields (without any GROUP BY-ing), so that one contains total number of rows or records, and one contain total number of records with NewFlag=1.
Just wondering if it is possible by using Aggregate and how.
Thanks for your help in advance,The Aggregate transform does not support calculations based on a conditional. However, since you are using 0 and 1 as values for the NewFlag, just sum that column and you should have the right result. You'll also need to select the count(*) aggregation in the dialog. Don't select any other columns, and you will get one row with the first column containing the total rows, and the second containing the NewFlag count.
No comments:
Post a Comment