* Data Reference for YEAR

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
brianlummis
Famous
Posts: 248
Joined: 18 Dec 2014 11:06
Family Historian: V7
Location: Suffolk, England
Contact:

Data Reference for YEAR

Post by brianlummis » 08 Mar 2023 20:04

I am using a Query where I am trying to list individuals that have a death date before a given year. In the Rows tab I am using the following expression .
"Exclude if %INDI.DEAT.DATE:YEAR% is less than ....."
However when I run the query many of the individual are not excluded even though the year of death is prior to the date I am testing. The reason appears to be that I have used the specifier "Before" in the Death Date, and the year is ignored when the query is run.

Have I missed something or is this as intended?

Brian

User avatar
LornaCraig
Megastar
Posts: 2989
Joined: 11 Jan 2005 17:36
Family Historian: V7
Location: Oxfordshire, UK

Re: Data Reference for YEAR

Post by LornaCraig » 08 Mar 2023 20:35

You said you want to list individuals who have a death date before a given year. Is that what you meant?

Your filter Exclude if %INDI.DEAT.DATE:YEAR% is less than ..... will exclude those people, not include them.

You would need to Add if %INDI.DEAT.DATE:YEAR% is less than... or Exclude unless %INDI.DEAT.DATE:YEAR% is less than ...

However, I can see that the use of 'before ' in the death date complicates things. I'm not sure how to get round that, but no doubt Mike will be along soon with a solution!
Lorna

avatar
brianlummis
Famous
Posts: 248
Joined: 18 Dec 2014 11:06
Family Historian: V7
Location: Suffolk, England
Contact:

Re: Data Reference for YEAR

Post by brianlummis » 08 Mar 2023 21:03

Sorry Lorna, I wasn't very clear even though I read through my requirements several times. :oops:

What I need is a list of individuals that exclude those who have died before a certain date. I have started my query by adding a list of those born after a certain date leaving me with a list of individuals between those two dates.

I will wait for Mike :)

Edit: I didn't have to wait long!

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

Re: Data Reference for YEAR

Post by tatewise » 08 Mar 2023 21:05

Instead of the :YEAR qualifier that only works on simple Dates, use the =Year(...) function that works for Date Periods and Ranges too. If there are two Dates in the Period or Range then I think it produces the first one.
i.e. =Year(%INDI.DEAT.DATE%)
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
brianlummis
Famous
Posts: 248
Joined: 18 Dec 2014 11:06
Family Historian: V7
Location: Suffolk, England
Contact:

Re: Data Reference for YEAR

Post by brianlummis » 08 Mar 2023 21:16

Thanks Mike

I have tried your suggestion and it gives me the result I was looking for. I did try to read through the FH Help and the FHUG Knowledgebase but I missed that function.

Brian

Post Reply