* Query: Age at birth of last child

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
gsward
Famous
Posts: 144
Joined: 11 Mar 2011 14:47
Family Historian: V7

Query: Age at birth of last child

Post by gsward » 08 Jun 2020 20:55

There is a custom query to show the age at the birth of the first child of a parent. Query:Individual ~ Age at Birth of First Child

How do I adapt it to show the age at the birth of the last child of a family?

Thanks.

Graham

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Query: Age at birth of last child

Post by tatewise » 08 Jun 2020 22:09

The answer is a bit complicated where multiple marriages/partnerships are involved.

So let's deal with the simple case of only one marriage/partnership per person.
On the Columns tab you need to use the following Expressions using the the [last] index:
=AgeAt(%INDI%,%INDI.FAMS[1]>CHIL[last]>BIRT.DATE%)
%INDI.FAMS[1]>CHIL[last]>%
%INDI.FAMS[1]>CHIL[last]>BIRT[1].DATE%

and on the Rows filter tab:
%INDI.FAMS[1]>CHIL[last]>BIRT[1].DATE%

But notice they all refer to INDI.FAMS[1] i.e. the 1st Spouse Family

So if the person had mutiple marriages/partnerships there will be INDI.FAMS[2] and maybe INDI.FAMS[3], etc.
But if you use INDI.FAMS[last] that marriage/partnership may not have any children, but earlier ones might.

However, there is a shortcut that yields the last child from any of the marriages/partnerships.
Replace each FAMS[1]>CHIL[last] with ~CHIL[last] so the first Expression above becomes:
=AgeAt(%INDI%,%INDI.~CHIL[last]>BIRT.DATE%)

In fact the original Query should have used ~CHIL[1] to get 1st child from any marriages/partnerships.

If you want the last child from each separate marriage/partnership then that will need a radically different method.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
gsward
Famous
Posts: 144
Joined: 11 Mar 2011 14:47
Family Historian: V7

Re: Query: Age at birth of last child

Post by gsward » 09 Jun 2020 08:31

Thanks, Mike.

I wanted to get a histogram from my data to give me the profile of age at the birth of the last child. It just might help me clarify the probable mother of a child with no recorded birth event.

User avatar
tatewise
Megastar
Posts: 27087
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Query: Age at birth of last child

Post by tatewise » 09 Jun 2020 09:14

So you need to add a Rows filter to exclude males as only the data for women is relevant.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
gsward
Famous
Posts: 144
Joined: 11 Mar 2011 14:47
Family Historian: V7

Re: Query: Age at birth of last child

Post by gsward » 09 Jun 2020 16:17

Here is the finished product.

Childbirth probability.jpg
Childbirth probability.jpg (328.53 KiB) Viewed 2400 times

Post Reply