Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to do a conditional count
Message
De
22/05/2003 19:14:54
 
 
À
22/05/2003 16:38:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00791701
Message ID:
00792003
Vues:
25
So, can you do...

COUNT(CASE WHEN Date = somethingYouWant THEN Date ELSE null END)

???

BOb


>You are correct it will ignore nulls. The problem is that the field that I need to do a distinct count on will always be populated. I need the count to be based on the date field. The dates maybe the same but are mostly different dates.
>
>NOI1234-00 Null
>NOI1234-00 Null
>NOI1234-00 2003-05-12 00:00:00.000
>NOI1234-00 2003-04-12 00:00:00.000
>
>The formula would return 1 in the about example and 2 in the example below.
>
>NOI1234-00 Null
>NOI1234-00 Null
>NOI1234-00 2003-05-12 00:00:00.000
>NOI5678-00 2003-04-12 00:00:00.000
>
>
>
>
>>>I need a formula to populate a running total variable with a distinct count of a field when another field (on the same record) is not null
>>>
>>>Something like
>>>
>>>Distinct Count(pocnum) where dreceived is not null
>>>
>>>
>>>Your help is greatly appreciated.
>>
>>If you create a count total field, I think it will already ignore nulls.
>>
>>BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform