Linking cells between tables

Discussions about tabulating data in the designer or in batch mode
Forum rules
New release: CSPro 8.0
Post Reply
atr
Posts: 27
Joined: August 25th, 2014, 7:03 pm

Linking cells between tables

Post 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
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Linking cells between tables

Post 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.
atr
Posts: 27
Joined: August 25th, 2014, 7:03 pm

Re: Linking cells between tables

Post by atr »

Thanks Greg,

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

best regards.
atr
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Linking cells between tables

Post 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.
Guest

Re: Linking cells between tables

Post by Guest »

I see that these command are not documented. Can we have some examples using it. Thank you for all.
Guest

Re: Linking cells between tables

Post by Guest »

I need some syntaxes examples using tblsum, tblmed.
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Linking cells between tables

Post 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.
Abnahi3
Posts: 1
Joined: March 9th, 2015, 8:52 am

Re: Linking cells between tables

Post 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.????
Usman
atr
Posts: 27
Joined: August 25th, 2014, 7:03 pm

Re: Linking cells between tables

Post 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
Post Reply