Count(*)
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact:
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact:
Before the transformer sort the input rows with your key column. And create stage variables in the transformer like below:
svOld - svNew
svNew - InputColumn.Key
svCheck - If svOld <> svNew then 'Y' Else 'N'
sv1 - If svCheck = 'Y' Then If InputLink.Col1 = 'YES' Then 1 Else 0 Else If InputLink.Col1 = 'YES' Then sv1+1 Else sv1
sv2 - If svCheck = 'Y' Then If InputLink.Col1 = 'NO' Then 1 Else 0 Else If InputLink.Col1 = 'NO' Then sv2+1 Else sv2
sv3 - If svCheck = 'Y' Then If InputLink.Col1 = 'NA' Then 1 Else 0 Else If InputLink.Col1 = 'NA' Then sv3+1 Else sv3
And include your source key column in hashed file as key, then you will get counts for each group. I did not try this but it should work. Try this and let me know.
svOld - svNew
svNew - InputColumn.Key
svCheck - If svOld <> svNew then 'Y' Else 'N'
sv1 - If svCheck = 'Y' Then If InputLink.Col1 = 'YES' Then 1 Else 0 Else If InputLink.Col1 = 'YES' Then sv1+1 Else sv1
sv2 - If svCheck = 'Y' Then If InputLink.Col1 = 'NO' Then 1 Else 0 Else If InputLink.Col1 = 'NO' Then sv2+1 Else sv2
sv3 - If svCheck = 'Y' Then If InputLink.Col1 = 'NA' Then 1 Else 0 Else If InputLink.Col1 = 'NA' Then sv3+1 Else sv3
And include your source key column in hashed file as key, then you will get counts for each group. I did not try this but it should work. Try this and let me know.
Arun
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact: