Page 1 of 1
Query - Possible Common Ancestors
Posted: 16 Apr 2020 11:53
by rfj1001
I'm getting into the DNA side of genealogy and have DNA matches that suggest, for example, potential 3rd cousins.
I'm trying to build a query in FH that would list the common ancestors for that relationship. It would involve entering the Starting Person and then the cousin relationship (ie 3 in the above example).
I've got to the stage where I can enter the Starting Person and the number of generations back I want to list (which for third cousins is 5 generations back) and the correct list is produced. But how can I enter 3 to get the result I want.
The line I've got currently is
Exclude unless = RelationCode(["Starting Person"]GENS_UP,1) equals ["Generations Required"].
Thanks in advance.
Re: Query - Possible Common Ancestors
Posted: 16 Apr 2020 13:07
by Jane
Code: Select all
=IsTrue(RelationCode(["Individual"],%INDI%,GENS_UP,1) = Calc(Number(["Gens"]) + 2))
is True
P.S Don't forget what Ancestry state as 3rd cousins could well be 2nd or 4th cousins or even further back and double cousins.
Re: Query - Possible Common Ancestors
Posted: 16 Apr 2020 13:23
by tatewise
Have you thought of using Tools > How Related instead?
Re: Query - Possible Common Ancestors
Posted: 16 Apr 2020 15:45
by rfj1001
Jane wrote: ↑16 Apr 2020 13:07
Code: Select all
=IsTrue(RelationCode(["Individual"],%INDI%,GENS_UP,1) = Calc(Number(["Gens"]) + 2))
is True
Thanks Jane, I'm part way there insofar as I can get the correct subset of people (I had to change +2 to +1). But when I run the query there is a window with 3 fields :
Starting Person
Individual
Gens
It is the last 2 that need to be completed for the query to run but I'm not sure where the first is coming from.
The Rows Filter window is just your line of code added as an 'Add if' condition. Is there something else I need to do to stop that first field displaying ?
Thanks in advance
Re: Query - Possible Common Ancestors
Posted: 16 Apr 2020 15:53
by rfj1001
tatewise wrote: ↑16 Apr 2020 13:23
Have you thought of using
Tools > How Related instead?
Thanks MIke for the suggestion.
The problem we have is that the two trees will be owned by different people and all we know is that somehow we are definitely related by DNA. So we have no second person on the same tree to run the How Related query.
Assuming both individual trees are sufficiently complete (and the calculated cousin match is accurate, to take up Jane's point

) then the first common identifier to link the two trees should be the surname at the correct ancestor level.
It's a bit rough and ready but working with a list of possible surnames is proving much more easier than visually trying to find the match on, say, someone's online tree.
Re: Query - Possible Common Ancestors
Posted: 16 Apr 2020 16:03
by Jane
Have you requested Starting Person? did you untick the prompt option when you replaced the line?
Re: Query - Possible Common Ancestors
Posted: 16 Apr 2020 17:09
by tatewise
["Starting Person"] can appear in any Expression in any tab: General, Columns, Rows.
So you need to check each one and either remove it or change it to ["Individual"].
Re: Query - Possible Common Ancestors
Posted: 16 Apr 2020 17:21
by rfj1001
No prompt - but there were references to Starting Person in some of the expressions defining the columns. (Now just read Mikes post that arrived!) I've deleted those fields and the unwanted field on the opening dialogue box has now gone. The query works almost perfectly. Thanks
However, I had to delete one important column and that is the relationship to the individual (eg GGF). I've played around with various expressions but all variants I've tried give an 'expression entered is not recognised as a valid function or some parameters were entered incorrectly'.
Could you give me the correct expression I need to enter please.
Thanks so much
Re: Query - Possible Common Ancestors
Posted: 16 Apr 2020 17:51
by tatewise
I presume that person is the one entered via the Individual prompt.
So try:
=Relationship(["Individual"],,TEXT,1)
It would be helpful if you posted your expression. You can see it, but we can't. So I have had to guess.
Re: Query - Possible Common Ancestors
Posted: 17 Apr 2020 08:47
by rfj1001
Thanks - query now fully working
