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 >