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
* function for marriage count?
- tatewise
- Megastar
- Posts: 28341
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: function for marriage count?
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.
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
-
- Famous
- Posts: 133
- Joined: 07 Jan 2015 20:24
- Family Historian: V6
- Location: Torbay, Devon, UK
Re: function for marriage count?
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
Thanks
- LornaCraig
- Megastar
- Posts: 3190
- Joined: 11 Jan 2005 17:36
- Family Historian: V7
- Location: Oxfordshire, UK
Re: function for marriage count?
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 199 times
Lorna
- DavidNewton
- Superstar
- Posts: 464
- Joined: 25 Mar 2014 11:46
- Family Historian: V7
Re: function for marriage count?
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
=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
-
- Famous
- Posts: 133
- Joined: 07 Jan 2015 20:24
- Family Historian: V6
- Location: Torbay, Devon, UK
Re: function for marriage count?
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
I am missing something or might there be a small typo in Mikes expression.
Thanks - Phil
- DavidNewton
- Superstar
- Posts: 464
- Joined: 25 Mar 2014 11:46
- Family Historian: V7
Re: function for marriage count?
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.]
=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.]
-
- Famous
- Posts: 133
- Joined: 07 Jan 2015 20:24
- Family Historian: V6
- Location: Torbay, Devon, UK
Re: function for marriage count?
Thanks David - works fine now