emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sankalp <sankalpkhare@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Referring to the Last Row of a Remote Table using @>
Date: Fri, 13 Jan 2012 07:47:10 +0530	[thread overview]
Message-ID: <CABcJk5Bk4P4EJT2RHGTdxtA1zHPo3yHyvEWkBNY6=54=CMQxmg@mail.gmail.com> (raw)
In-Reply-To: <CABcJk5BQBFXH=Xo34NY5cBuzcRT=qA4gCote25zr3QjLZO2rBA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2033 bytes --]

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 <sankalpkhare@gmail.com> 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
>

[-- Attachment #2: Type: text/html, Size: 5115 bytes --]

  reply	other threads:[~2012-01-13  2:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13  2:12 Referring to the Last Row of a Remote Table using @> Sankalp
2012-01-13  2:17 ` Sankalp [this message]
2012-01-13  3:25   ` Sankalp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABcJk5Bk4P4EJT2RHGTdxtA1zHPo3yHyvEWkBNY6=54=CMQxmg@mail.gmail.com' \
    --to=sankalpkhare@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).