Page 1 of 1

Linking cells between tables

Posted: October 1st, 2014, 5:26 pm
by atr
Hi,

Have been trying to create a summary table from some other tables and it is working out perfectly except for the median age.

I have this table by 5 year age groups and the median at the bottom and am trying to copy this median ages to my summary tables but to vail.

Am using the post-calc logic 'TABLEX[3,*] = TABLE1[18,*]'....where table1 row 18 is the median age.

Appreciate any asisstance.
cheers
atr

Re: Linking cells between tables

Posted: October 2nd, 2014, 4:19 pm
by Gregory Martin
Unfortunately, the way that CSPro processes tables, it will first run all of the PostCalc steps before it fills in any of the calculated values (like a median). That's why you aren't able to copy those values in PostCalc logic.

That design makes your task difficult. You may just have to add that median age calculation to TABLEX as well.

Re: Linking cells between tables

Posted: October 6th, 2014, 4:53 pm
by atr
Thanks Greg,

I managed to do it using the 'tblmed' command in the summary table.

best regards.
atr

Re: Linking cells between tables

Posted: October 16th, 2014, 8:19 pm
by Gregory Martin
Oh wow, I work on the product and I didn't even know about the tblmed command. (I rarely use the tabulation system.) Thanks for bringing it to my attention. Looking at the code, I see that there is also a function, tblsum, that could prove useful at some point.

Re: Linking cells between tables

Posted: October 17th, 2014, 7:48 am
by Guest
I see that these command are not documented. Can we have some examples using it. Thank you for all.

Re: Linking cells between tables

Posted: October 17th, 2014, 7:52 am
by Guest
I need some syntaxes examples using tblsum, tblmed.

Re: Linking cells between tables

Posted: October 27th, 2014, 6:25 pm
by Gregory Martin
Here is an example of the tblmed function being used on a DHS:

http://userforum.dhsprogram.com/index.p ... 0&mid=2045

This is a rather advanced function, so I would only use it if absolutely necessary.

Re: Linking cells between tables

Posted: March 9th, 2015, 9:01 am
by Abnahi3
Thank you very much! I found the OLD_TABS variable with a value of Y just like you said. Deleting this variable solved the problem.????

Re: Linking cells between tables

Posted: March 12th, 2015, 12:04 am
by atr
Hi guys,

Sorry for the late reply.

This i smy syntax to include the median age in my summary table. It is for 5-years age groups.

TABLEX[5,*] = tblmed(row TABLE1[1:17,*] intervals (highest 110 lowers 0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80));

Hope this helps.

cheers
atr