I'm trying to include a summary line on a fan chart indicating census returns I have relating to each individual, e.g. "678" for 1861, 1871 and 1881. I came up with a scheme using multiple ExistText(<flag>,<digit>), but there appears to be a limit on the length of the expression, who stops it working. Could somebody confirm this?
Thanks
* Custom fan chart contents
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Custom fan chart contents
Yes, I believe there is a limit, but try this Template Expression:
=TextIf(Year(%INDI.CENS.DATE%) < 1900,Number((Year(%INDI.CENS.DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[2].DATE%) < 1900,Number((Year(%INDI.CENS[2].DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[3].DATE%) < 1900,Number((Year(%INDI.CENS[3].DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[4].DATE%) < 1900,Number((Year(%INDI.CENS[4].DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[5].DATE%) < 1900,Number((Year(%INDI.CENS[5].DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[6].DATE%) < 1900,Number((Year(%INDI.CENS[6].DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[7].DATE%) < 1900,Number((Year(%INDI.CENS[7].DATE%) - 1801) / 10),)
which must be all entered on one line.
Since it allows for 7 Census Events, that should more than cater for 1841 through to 1891.
It works by testing if the Census Year is before 1900, and then calculates which decade by subtracting 1801 and dividing the result by 10.
e.g. 1861 - 1801 = 60 and then 60 / 10 = 6
=TextIf(Year(%INDI.CENS.DATE%) < 1900,Number((Year(%INDI.CENS.DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[2].DATE%) < 1900,Number((Year(%INDI.CENS[2].DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[3].DATE%) < 1900,Number((Year(%INDI.CENS[3].DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[4].DATE%) < 1900,Number((Year(%INDI.CENS[4].DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[5].DATE%) < 1900,Number((Year(%INDI.CENS[5].DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[6].DATE%) < 1900,Number((Year(%INDI.CENS[6].DATE%) - 1801) / 10),)
=TextIf(Year(%INDI.CENS[7].DATE%) < 1900,Number((Year(%INDI.CENS[7].DATE%) - 1801) / 10),)
which must be all entered on one line.
Since it allows for 7 Census Events, that should more than cater for 1841 through to 1891.
It works by testing if the Census Year is before 1900, and then calculates which decade by subtracting 1801 and dividing the result by 10.
e.g. 1861 - 1801 = 60 and then 60 / 10 = 6
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
Nosferatu
- Gold
- Posts: 10
- Joined: 06 Jan 2013 15:59
- Family Historian: V5
- Location: Yorkshire, England
Re: Custom fan chart contents
Thanks Mike. I think that would put each on its own line - I really want them on one line.
After a slight change of approach, I got something which works - replacing ExistsText(%INDI._FLGS.__1841_UK_CENSU%,"4") with ExistsText(%INDI.CENS[year=1841]%,"4") makes it short enough.
After a slight change of approach, I got something which works - replacing ExistsText(%INDI._FLGS.__1841_UK_CENSU%,"4") with ExistsText(%INDI.CENS[year=1841]%,"4") makes it short enough.
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Custom fan chart contents
NO, the Expression I gave, if all entered into one Template on one line will produce exactly what you requested.
However, your solution is much, much neater, which in full presumably is:
However, your solution is much, much neater, which in full presumably is:
Code: Select all
=ExistsText(%INDI.CENS[year=1841]%,"4")=ExistsText(%INDI.CENS[year=1851]%,"5")=ExistsText(%INDI.CENS[year=1861]%,"6")=ExistsText(%INDI.CENS[year=1871]%,"7")=ExistsText(%INDI.CENS[year=1881]%,"8")=ExistsText(%INDI.CENS[year=1891]%,"9")=ExistsText(%INDI.CENS[year=1901]%,"0")=ExistsText(%INDI.CENS[year=1911]%,"1")
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
Nosferatu
- Gold
- Posts: 10
- Joined: 06 Jan 2013 15:59
- Family Historian: V5
- Location: Yorkshire, England
Re: Custom fan chart contents
Apologies - didn't really understand what you meant by Template Expression. Not sure how to create one of those for a fan chart. I tried the looking in the Help, and came across how to create Text Templates, but I don't think they can be used on Fan Charts - that type of diagram doesn't have a Diagram Options Dialog.
Yes, pretty much as you showed, but I added CombineText("C: ", Text(...)) around it to prefix them with a C if there was at least one census entry found.
Yes, pretty much as you showed, but I added CombineText("C: ", Text(...)) around it to prefix them with a C if there was at least one census entry found.
- Jane
- Site Admin
- Posts: 8442
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Re: Custom fan chart contents
To edit the text on a fan chart, select it and right click and select format then the Text tab and edit the scheme.
- Attachments
-
- 2013-12-27_095828.png (9 KiB) Viewed 4589 times
-
- 2013-12-27_095811.png (9.11 KiB) Viewed 4589 times
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."