grumbachr Posted February 23, 2009 Posted February 23, 2009 I've have a table of records its the 'Many' of a One to many relationship. It includes Age and a Value. The ID comes from a Contacts Table. I've got a Summary field working perfectly except now I would like to have it only count the records with a unique ID. The values are sorted by age. I need to know how many people had a record at an age not how many records I have at that age. Example ID Age Value 223 9 10 223 9 15 276 9 12 So my summary would be 2 not 3 (3 is the current value i'm getting).
Vaughan Posted February 23, 2009 Posted February 23, 2009 From your data, there are only three 9s in the age column, so wouldn't the unique count be 1? I'd be using the custom function UniqueValues() combined with the List() function and ValueCount()... ValueCount( UniqueValues( List( relationship::age ) ) ) The UniqueValues function is posted on Brian Dunnings web site.
comment Posted February 23, 2009 Posted February 23, 2009 I need to know how many people had a record at an age The context is not clear. Are you talking about one specific age (e.g. entered into a global), or is this in the context of a report?
grumbachr Posted February 23, 2009 Author Posted February 23, 2009 its in the context of the report. Sorry i'm never good at typing this stuff out. But the request is to give a count of records for each age between ages 9 and 13 with a value between 8 and 25. but only count each contact once at each age. The probably no more clean than the last explanation. Sorry.
comment Posted February 24, 2009 Posted February 24, 2009 You need three fields for this: sCount = Summary, Count of SerialID (or any field that cannot be empty) cInvCountByContact = 1 / GetSummary ( sCount ; ContactID ) sCountContacts = Summary, Total of cInvCountByContact Sort your records by Age, then ContactID.
Recommended Posts
This topic is 5811 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now