Saturday, February 25, 2012

custom count within group crystal XI

Hi,

I need to count number of consequtive weeks within a group:

Group_name consequtive: 2
person1 7/5/07
person2 7/19/07
person3 7/26/07


Consequtive is equal to 2 within this group, since person 2 and 3 are 1 week apart.

anybody know how to code this in CR XI?

thx in advanceUse the DateDiff function. If the DateDiff (w) of the previous week to this week = 1, then increment a running total by 1.

No comments:

Post a Comment