Click to See Complete Forum and Search --> : custom count within group crystal XI


ponchoxx2
August 20th, 2007, 04:54 PM
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 advance

tgarner444
August 30th, 2007, 04:26 PM
Use the DateDiff function. If the DateDiff (w) of the previous week to this week = 1, then increment a running total by 1.