From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sankalp Subject: Re: Referring to the Last Row of a Remote Table using @> Date: Fri, 13 Jan 2012 08:55:26 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec54ee964b93d7e04b6606bf9 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlXm1-0005M1-OO for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 22:25:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlXlz-0008K6-Vl for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 22:25:49 -0500 Received: from mail-vx0-f169.google.com ([209.85.220.169]:37236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlXlz-0008K1-OB for emacs-orgmode@gnu.org; Thu, 12 Jan 2012 22:25:47 -0500 Received: by vcbf1 with SMTP id f1so57865vcb.0 for ; Thu, 12 Jan 2012 19:25:47 -0800 (PST) In-Reply-To: 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: emacs-orgmode --bcaec54ee964b93d7e04b6606bf9 Content-Type: text/plain; charset=ISO-8859-1 Hi, Just saw this : http://thread.gmane.org/gmane.emacs.orgmode/50991 Apologies for initiating a new thread when the issue was already being discussed. Sincerely, ------- Sankalp On 13 January 2012 07:47, Sankalp wrote: > Here's a screenshot, for those who cannot see the table spacing properly > in the email > > http://imgur.com/4W75H > > ------- > Sankalp > > > > On 13 January 2012 07:42, Sankalp wrote: > >> Hi, >> I have the following situation : >> >> #+TBLNAME: Totals >> |--------+--------| >> | Name | Amount | >> |--------+--------| >> | xyz | 90 | *<-- should evaluate to 130, not 90* >> |--------+--------| >> | TOTAL | | >> |--------+--------| >> #+TBLFM: @2$2=remote(xyz,@>$4) *<-- I'm trying to refer to the last >> row, 4th column in table xyz* >> >> #+TBLNAME: xyz >> |----------------+----------------------+------------------+--------| >> | Title | Description | Date | Amount | >> |----------------+----------------------+------------------+--------| >> | Trichy Tickets | Trichy Gig Travel | | 1200 | >> | PAID | | [2011-10-16 Sun] | -1000 | >> | Blah | Prior to Inorbit Gig | [2011-11-11 Fri] | 90 | >> | InOrbit Money | Payment for Gig | [2011-11-11 Fri] | -200 | >> | Biryani | Al-Saba | [2012-01-07 Sat] | 120 | >> | Sub | Chicken Ham | [2012-01-12 Thu] | -75 | >> | Blah | I had asdad | [2012-01-12 Thu] | -5 | >> |----------------+----------------------+------------------+--------| >> | TOTAL | | | 130 | >> |----------------+----------------------+------------------+--------| >> #+TBLFM: $4=vsum(@2..@-1) >> >> Instead of showing 130, the formula in the "Totals" table is showing 90. >> >> Upon some investigation, it becomes apparent that even though the >> formula *should* point to the last row in the remote table >> (value 130), "@>" in the remote table reference is actually evaluating to >> "@3" (since the current table has 3 rows) instead >> of evaluating to "@9" as expected (since the remote table has 9 rows). >> >> Is this a bug? or am I making some mistake in the formula. >> >> ------- >> Sankalp >> > > --bcaec54ee964b93d7e04b6606bf9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,
Just saw this :=A0http://thread.gmane.org/gmane.emacs.orgmode/50991<= /div>

Apologies for initiating a new thread when the issue = was already being discussed.

Sincerely,
-------<= br>Sankalp


On 13 January 2012 07:47, Sankalp <sankalpkhare@gmai= l.com> wrote:
Here's a screenshot, for those who ca= nnot see the table spacing properly in the email


-------
Sankalp



On 13 January 2012 07:42, Sankalp <sankalpkhare@gmail.com> wrote:
Hi,
I have the following situation :

#+= TBLNAME: Totals
|--------+-------= -|
| Name = =A0 | Amount |
|--------+--------|
| xyz =A0 =A0| =A0 =A0= 90 | =A0<-- should evaluat= e to 130, not 90
|--------+--------|
| TOTAL =A0| =A0 =A0 = =A0 =A0|
|= --------+--------|
#+TBLFM: @2$2=3Dremote(xyz,@>$4) =A0<-- I'm trying to refer to the last row, 4th colum= n in table xyz

=
#+TBLNAME: xyz
|-----------= -----+----------------------+------------------+--------|
| Title =A0 =A0 = =A0 =A0 =A0| Description =A0 =A0 =A0 =A0 =A0| Date =A0 =A0 =A0 =A0 =A0 =A0 = | Amount |
= |----------------+----------------------+------------------+--------|
| Trichy Tickets= | Trichy Gig Travel =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 1200= |
| PAID = =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| [2011-10= -16 Sun] | =A0-1000 |
| Blah =A0 =A0 = =A0 =A0 =A0 | Prior to Inorbit Gig | [2011-11-11 Fri] | =A0 =A0 90 |
<= div style=3D"font-family:'courier new',monospace">| InOrbit Money = =A0| Payment for Gig =A0 =A0 =A0| [2011-11-11 Fri] | =A0 -200 |
| Biryani =A0 = =A0 =A0 =A0| Al-Saba =A0 =A0 =A0 =A0 =A0 =A0 =A0| [2012-01-07 Sat] | =A0 = =A0120 |
| = Sub =A0 =A0 =A0 =A0 =A0 =A0| Chicken Ham =A0 =A0 =A0 =A0 =A0| [2012-01-12 T= hu] | =A0 =A0-75 |
| Blah =A0 =A0 = =A0 =A0 =A0 | I had asdad =A0 =A0 =A0 =A0 =A0| [2012-01-12 Thu] | =A0 =A0 -= 5 |
|------= ----------+----------------------+------------------+--------|
| TOTAL =A0 =A0 = =A0 =A0 =A0| =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0| =A0 =A0130 |
|----------------+----------------------+-----------= -------+--------|
#+TBLFM: $4=3Dvsum(@2.= .@-1)
Instead of showing 130,= the formula in the "Totals" table is showing 90.

Upon some investigation,=A0it becomes apparent that even though the formul= a should=A0point to the last row in the remote = table
(value 130), "@>"= ; in the remote table reference is actually evaluating to "@3" (s= ince the current=A0ta= ble has 3 rows) instead
of evaluating to "= @9" as expected (since the remote table has 9 rows).
=
Is this a bug? or am I making some mistake in the formula.=

-------
Sankalp



--bcaec54ee964b93d7e04b6606bf9--