Page 1 of 1

Counters

Posted: Wed Nov 12, 2008 10:44 am
by Nicole
Hi there...

I want to subtract the value of 2 columns and if they are below a certain amount, then I want to add 1 to a counter. What is the best way to do this?

Should I create a count output column and in the derivation put the criteria in an IF statement?

I looked in the forum for counter examples or questions but didn't see THAT much out there.

Thank you in advance for your help.

Nicole

Re: Counters

Posted: Wed Nov 12, 2008 10:52 am
by pratimdc
If I have understood your requirement, then may be this will help -
1. Suppose the columns under consideration as C1 and C2
2. Use Column Generator or Transformer to generate a new column C3.
3. Then make C3 = C2 - C1
4. Use Filter stage to apply filter on C3, pertaining to your value.
5. Use Aggregator stage to count the number of rows.

You will have thus the count.

Posted: Wed Nov 12, 2008 11:27 pm
by ray.wurlod
U (one of our posters) did not ask the question.

The second personal pronoun in the nominative case in English is spelled "you", not "u". Please strive for a professional standard of written English on DSXchange.