[Filter: smut] hogi's post body matched "cum", board "discussions".
Post Subject: Re: JMP equivalent of Excel's COUNTIF function
Post Body:
New Column( "ColSum4",
Formula(
myAGE = :age;
myname= :name;
Col Sum( show(myname,myAge,:name,:age,"-");:age == myAGE );
)
);
is quite illustrative. Col Cum behaves a bit different from how I thout it behaves.
I guessed Col Sum evaluates the arguemt once and then groups/collects the results according to groupBy.
But actually:
Formula is evaluated for every row, in total 40x for rows RWx.
And with every iteration, Col Sum evaluates it's argument 40 times - for every row RWy.
I guess it tries to cache the result and won't evaluate the argument again for other RWx if it can be sure that it will be the same result.
But in the case of Show() or :age = myAGE, it has to evaluate again and again.
-> in total 40 x 40 times.
so ,e.g. for row RWx = 3 (myName = Jane) , it evaluates the argument 40 times.
And for 8 of the 40 RWy, :age == myAge results in 1. So Col Sum is 8.
Body text "Cum" matched filter pattern "cum".
Post by User[id=26800,login=hogi] has message uid 783515.
Link to post: Re: JMP equivalent of Excel's COUNTIF function