*function for marriage count?

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile
Rafal
Silver
Posts: 7
Joined: 16 Aug 2010 14:55
Family Historian: None

function for marriage count?

Postby Rafal » 23 Nov 2015 16:45

Hello,

It's been over five years since I have looked at Family Historian -- it was v. 4 then and I tried to make the pedigree charts look the way I want. I was almost successful: http://www.fhug.org.uk/forum/viewtopic. ... 64&p=41518

What I needed then was a function to return number of marriages for a person -- an equivalent of ChildCount().

I wonder if anything like that has been added with versions 5 or 6?

Best regards,

Rafal

User avatar
tatewise
Megastar
Posts: 15201
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: function for marriage count?

Postby tatewise » 23 Nov 2015 18:09

Hi Rafal, please use the User Control Panel > Profile at very top of this page to set your Family Historian Version so it shows on the right of your postings instead of None.

I don't think FH V5 or V6 have added anything to produce a Marriage Count.

Please clarify whether you actually need a Marriage count or a Family partnership count?
One counts Marriage Event (MARR) tags the other counts Family as Spouse (FAMS) tags.

In either case you could use =NumberIf() with =Exists() functions.
e.g.
For Family as Spouse case:
=NumberIf( Exists(%INDI.FAMS[3]%), 3, NumberIf( Exists(%INDI.FAMS[2]%), 2, NumberIf( Exists(%INDI.FAMS[1]%), 1, 0 ) ) )

The Marriage Event case is much more complex.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

philmcleod
Famous
Posts: 125
Joined: 07 Jan 2015 20:24
Family Historian: V6
Location: Torbay, Devon, UK

Re: function for marriage count?

Postby philmcleod » 22 Nov 2016 22:55

I wish to find all the individuals that have had more than 1 partner. As I am not an expert query writer is there anything readily available as an add on or guidance on columns, rows & functions to use
Thanks

User avatar
LornaCraig
Megastar
Posts: 1408
Joined: 11 Jan 2005 17:36
Family Historian: V6.2
Location: Oxfordshire, UK

Re: function for marriage count?

Postby LornaCraig » 22 Nov 2016 23:18

I can't remember where I got it from but I had this custom Query:
Attachments
Individuals with more than one partner.fhq
(678 Bytes) Downloaded 59 times
Lorna

User avatar
DavidNewton
Superstar
Posts: 429
Joined: 25 Mar 2014 11:46
Family Historian: V6

Re: function for marriage count?

Postby DavidNewton » 23 Nov 2016 00:57

Mikes suggestion, which records up to three spouse families, will include single person spouse families. That is, spouse familes with an unknown (to your file) partner. If you want to only count those families (i.e. amongst the first three) with a known partner then the following variation should do

=calc(NumberIf(Exists(%INDI.~SPOU[1]>%),1,0) + NumberIf(Exists(%INDI.~SPOU[2]>%),1,0) + NumberIf(Exists(%INDI.~SPOU[3]>%), 1, 0 ))

To use this in the individual records window right create a custom 'other' column labelled whatever you like and copy-paste the formula into the Expression box.

David

philmcleod
Famous
Posts: 125
Joined: 07 Jan 2015 20:24
Family Historian: V6
Location: Torbay, Devon, UK

Re: function for marriage count?

Postby philmcleod » 23 Nov 2016 08:25

Thanks, but whilst David's expression works OK, for some reason Mike's returns an error that it is not a valid function or parameters entered wrongly.
I am missing something or might there be a small typo in Mikes expression.
Thanks - Phil

User avatar
DavidNewton
Superstar
Posts: 429
Joined: 25 Mar 2014 11:46
Family Historian: V6

Re: function for marriage count?

Postby DavidNewton » 23 Nov 2016 09:04

There are some missing (closing) % signs in Mike's expression

=NumberIf( Exists(%INDI.FAMS[3]%), 3, NumberIf( Exists(%INDI.FAMS[2]%), 2, NumberIf( Exists(%INDI.FAMS[1]%), 1, 0 ) ) )

David

[EDIT by Mike Tate: Yes, sorry, I have corrected them in original posting.]

philmcleod
Famous
Posts: 125
Joined: 07 Jan 2015 20:24
Family Historian: V6
Location: Torbay, Devon, UK

Re: function for marriage count?

Postby philmcleod » 23 Nov 2016 09:35

Thanks David - works fine now


Return to “General Usage”

Who is online

Users browsing this forum: No registered users and 15 guests