5 Replies Latest reply: Feb 10, 2016 10:01 AM by Sunny Talwar

# count Datefield1 -= Datefield2 DISTINCT on Field3

Good Day Community we would like to do the following:

count Datefield1 -= Datefield2 DISTINCT on Field3

But we seem to be struggling with the correct syntax.

We want to count distinct Field3 where DateField1 is not equal to DateField2.

Your most urgent assistance is appreciated.

• ###### Re: count Datefield1 -= Datefield2 DISTINCT on Field3

May be this:

Count(DISTINCT {<Field3 = {"=DateField1 <> DateField2"}>} Field3)

• ###### Re: count Datefield1 -= Datefield2 DISTINCT on Field3

Thank you for your quick response, just to clarify in our example:

• Field3 is a unique identity number for example for a person's id number.
• Datefield1 is a date that the person registered.
• Datefield2 is a date that the person resigned.

So basically if the two dates aren't equal count distinctly Field3.

Would your above example still apply?

Regards,

Heinrich

• ###### Re: count Datefield1 -= Datefield2 DISTINCT on Field3

So just to make sure I understand. Each persion's id will only have a single Datefield1 and Datefield2 or can they have multiple values for Datefield1 and Datefield2?

• ###### Re: count Datefield1 -= Datefield2 DISTINCT on Field3

It worked! Thank you so much!

• ###### Re: count Datefield1 -= Datefield2 DISTINCT on Field3

Awesome