* A census query - Couples living apart

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
E Wilcock
Megastar
Posts: 1181
Joined: 11 Oct 2014 07:59
Family Historian: V7
Location: London
Contact:

A census query - Couples living apart

Post by E Wilcock »

With profound apologies Mike but my memory is failing.

I would like a query which lists women who appear on a census at a different address from their husband.
I have a query which finds women whose husbands were listed in a different town.
Is there a way to do this, if the couple are living apart but in the same town?
User avatar
tatewise
Megastar
Posts: 28344
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: A census query - Couples living apart

Post by tatewise »

So presumably a Row filter compares their CENS.PLAC fields and includes the couple if those fields differ.

To check addresses, I imagine you need the Row filter to compare their CENS.ADDR fields instead.

However, without knowing how you store town and address details in the CENS.PLAC and CENS.ADDR fields it is impossible to be specific.

Post a copy of your Query and explain your CENS.PLAC and CENS.ADDR field formats if you need more detailed advice.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
E Wilcock
Megastar
Posts: 1181
Joined: 11 Oct 2014 07:59
Family Historian: V7
Location: London
Contact:

Re: A census query - Couples living apart

Post by E Wilcock »

Mike, On my research databases, I use the fh Place field for the whole address, as given on the census. I paste that same address into the citation. I think you taught me to do this when I was new to fh.
It means one can use the fh Search function to find a whole household of people with different surnames, e.g. a Nurses' home.
I use the fh address field very rarely and only for details like the grave plot number.

I do not know how to print out and show you a query. Is there a way of doing this or should I just type out the query by hand?

I currently have
Add if %INDI.CENS[1].PLAC>% contains (parameter which is the town name)
Exclude if %INDI.FAMS[1]>HUSB[1]>CENS[1]% contains (parameter which is the town name)

This gets me mothers in separated coupes where the man is not living in the same town. But it misses divorced couples living close to each other in the same town.
User avatar
tatewise
Megastar
Posts: 28344
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: A census query - Couples living apart

Post by tatewise »

OK, run the same Query, but when prompted, enter the address you want to check instead of the town.
If necessary you can include the town with the address separated by whatever commas are necessary.

The %INDI.CENS[1].PLAC>% contains ["prompt"] Expression is not looking specifically for a town but just looking for any text in the Place name that matches what you enter at the prompt.
So, if the Place name is 24, High Street, Newtown, Kent it will match Newtown or 24, High Street or 24, High Street, Newtown or any other text you enter at the prompt that occurs within the Place name text.

To post a Query, either take a screenshot and attach that image, or attach its .fhq Family Historian Query file that can be found in the C:\ProgramData\Calico Pie\Family Historian\Queries\Custom\ folder.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
E Wilcock
Megastar
Posts: 1181
Joined: 11 Oct 2014 07:59
Family Historian: V7
Location: London
Contact:

Re: A census query - Couples living apart

Post by E Wilcock »

Mike, that wont do. My queries search through lots of people. I have 2690 people on this town data base. I have three Place projects and a fourth where I throw anyone else. The result set in this instance is likely to be about 40 women.
Dont worry. I think I can work something out using another query you helped me with. But I will leave it till tomorrow.
User avatar
tatewise
Megastar
Posts: 28344
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: A census query - Couples living apart

Post by tatewise »

Replace this Row filter:
Exclude if %INDI.FAMS[1]>HUSB[1]>CENS[1].PLAC>% contains ["..."]
with this Row filter:
Exclude if =IsTrue(%INDI.CENS[1].PLAC>% = %INDI.FAMS[1]>HUSB[1]>CENS[1].PLAC>%) is true

The Row filter Add if %INDI.CENS[1].PLAC>% contains ["..."] adds everyone whose Census Place is the required town.

The new Row filter excludes anyone where the husband in 1st Family has the same Census Place name.
That excludes all the male partners because they are the husband in the partnership.
It also excludes all female partners with an identical Place name as their husband.
So that will retain all females who have a different Place name than their husband.
It might be a different town or a different address or a different country.

BTW: Those Row filters only test the 1st partnership (INDI.FAMS[1]) so subsequent (INDI.FAMS[2]) partners are not checked.
Is that important to you?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
E Wilcock
Megastar
Posts: 1181
Joined: 11 Oct 2014 07:59
Family Historian: V7
Location: London
Contact:

Re: A census query - Couples living apart

Post by E Wilcock »

Thank you so much Mike. I have managed a query this morning which will find married women living apart from their husband.

Add if %INDI.SEX% matches Female
Exclude unless %INDI.CENS[1].PLAC>% contains (Parameter)
Exclude if %INDI.FAMS[1]>HUSB[1]>% is null
and finally the row that you provided
Exclude if =IsTrue(%INDI.CENS.PLAC>% = %INDI.FAMS>HUSB>CENS.PLAC>%)

I left off the second "is true" as it appeared that fh didnt like it. But could be my error.
My result list for my first town is 122 women and the columns show 17 people where data is lacking and I will need to chase them up.
I really appreciate your help and patience over this. I have forced myself to stop data entry and actually look at the results.
User avatar
tatewise
Megastar
Posts: 28344
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: A census query - Couples living apart

Post by tatewise »

You say you left off the second "is true" as it appeared that fh didn't like it.
"is true" is the only Operator that FH will accept in the line below that Expression.
It is not part of the Expression in the same way that "matches", "contains" & "is null" are also Operators.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
E Wilcock
Megastar
Posts: 1181
Joined: 11 Oct 2014 07:59
Family Historian: V7
Location: London
Contact:

Re: A census query - Couples living apart

Post by E Wilcock »

I have tried again. Thank you. Mike. Everything looks good.

I understand why I thought the line was rejected.
fh allows one to re-organise the lines of a query into a certain order, after one has written them. But it wont let you start by writing a complicated removal line. One must do that only after adding the group from which it is to do the subtraction.
Post Reply