emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Referring to the Last Row of a Remote Table using @>
@ 2012-01-13  2:12 Sankalp
  2012-01-13  2:17 ` Sankalp
  0 siblings, 1 reply; 3+ messages in thread
From: Sankalp @ 2012-01-13  2:12 UTC (permalink / raw)
  To: emacs-orgmode

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

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: 4376 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-13  3:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13  2:12 Referring to the Last Row of a Remote Table using @> Sankalp
2012-01-13  2:17 ` Sankalp
2012-01-13  3:25   ` Sankalp

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).