From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: table: referencing row of other table Date: Mon, 13 Aug 2012 18:27:21 -0400 Message-ID: <5758.1344896841@alphaville> References: <2012-08-13T23-36-12@devnull.Karl-Voit.at> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T136d-0006EE-Ce for emacs-orgmode@gnu.org; Mon, 13 Aug 2012 18:27:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T136a-0000oS-CE for emacs-orgmode@gnu.org; Mon, 13 Aug 2012 18:27:27 -0400 Received: from g6t0187.atlanta.hp.com ([15.193.32.64]:20172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T136a-0000oI-8P for emacs-orgmode@gnu.org; Mon, 13 Aug 2012 18:27:24 -0400 In-Reply-To: Message from Karl Voit of "Mon, 13 Aug 2012 23:50:06 +0200." <2012-08-13T23-36-12@devnull.Karl-Voit.at> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: news1142@Karl-Voit.at Cc: emacs-orgmode@gnu.org Karl Voit wrote: > Hi! > > I want to use the column "average" of the first table to fill the > column "h1" in the second one. > > #+TBLNAME: 2012-08-12vkmeasure > | tags/item | m1 | m2 | m3 | average | > |-----------+-------+-------+-------+---------| > | 4 | 0.02 | 0.03 | 0.02 | 0.02 | > | 5 | 0.06 | 0.12 | 0.06 | 0.08 | > | 6 | 0.31 | 0.53 | 0.29 | 0.38 | > | 7 | 3.83 | 4.08 | 4.48 | 4.13 | > | 8 | 85.33 | 89.22 | 92.07 | 88.87 | > #+TBLFM: $5 = vmean($2..$4);%.2f > > | tags/item | h1 [s] | h2 [s] | > |-----------+--------+--------| > | 4 | | | > | 5 | | | > | 6 | | | > | 7 | | | > | 8 | | | > #+TBLFM: > #+TBLFM: $2 = remote(2012-08-12vkmeasure, @@#$5) Nick > I tried following references but failed so far: > > @2$2..@6$2=subscr(remote(2012-08-12vkmeasure,@2$5..@6$5),$#) #-> 0.08 0.08 ... > @2$2=remote(2012-08-12vkmeasure,@2$5) -> works for one value > @2$2..@6$2=subscr(remote(2012-08-12vkmeasure,@2$5..@6$5),$#) #-> 0.08 0.08 ... > $2=subscr(remote(2012-08-12vkmeasure,@I$>..@II$>),$#) > > What did I do wrong? > > How is the correct TBLFM in order to get 0.02 ... 88.87 into the > h1-column? > > Thanks for your help! > > -- > Karl Voit > >