Does the Referred by field enter a name or a contact ID? It should enter a contact ID. Contact names are not unique. People change their names and names can easily be entered incorrectly and later need to be changed. If you are linking records by name instead of an ID, all of those details become problems when working with your database.
Using an ID field, you can set up a self join relationship:
Contacts::ContactID = Contacts|ReferredBy::ReferredByID ----> this should be your field with a value list for selecting a referral contact
Where Contacts and Contacts|ReferredBy are two Tutorial: What are Table Occurrences? of the same data source table.
Then Count ( Contacts|ReferredBy::ReferredByID ) will return the number of referrals for a given contact.
Thanks for your help Phil.
I have managed the first part (two occurrences with a self join relationship) which makes sense.
However I am still struggling with the second part - setting up the count.
Each time I set up the calculation i receive an error "The specified table cannot be found" (which highlights "Contacts|ReferredBy")
And what did you name that second occurrence? From the error message, the second occurrence is not named "Contacts|ReferredBy".
Very sorry for the lack of reply, I have been somewhat unwell of late and not had a chance to look into this for a very long time.
Back to full health now, but have lost all my previous work and am starting again from scratch. Unfortunately I seem to have forgotten a lot of what I had previously learned.