Count of populated fields

alan2013

Registered User.
Local time
Today, 03:17
Joined
Mar 24, 2013
Messages
92
I'm trying to get something to work, so far with no success, and wondered if someone could offer some advice ?

If I have a Report, with three fields (all data-type Text) named 'Jan', 'Feb' and 'Mar', and I want to have a fourth field (Unbound) alongside them, providing a count of the number of fields out of these three fields that are populated, how might I be able to do that, please ?

Thanks for any help you can provide.

Best wishes
Al
 
You could add a calculated column to your query.

Select ..., IIf(IsNull(fldA),0,1) + IIf(IsNull(fldB),0,1) + IIf(IsNull(fldC),0,1) AS fldCount
 
Thanks, Pat. That worked.
A
 

Users who are viewing this thread

Back
Top Bottom