From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Table formulas: daily hour * rate = cost Date: Thu, 12 Feb 2015 13:44:43 +0100 Message-ID: <87bnkzwb7o.fsf@gmx.us> References: <878ug38gti.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLt8e-0005Nt-4V for emacs-orgmode@gnu.org; Thu, 12 Feb 2015 07:45:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLt8b-0007yx-Eb for emacs-orgmode@gnu.org; Thu, 12 Feb 2015 07:45:00 -0500 Received: from plane.gmane.org ([80.91.229.3]:51198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLt8b-0007ys-84 for emacs-orgmode@gnu.org; Thu, 12 Feb 2015 07:44:57 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YLt8Z-0006nF-EA for emacs-orgmode@gnu.org; Thu, 12 Feb 2015 13:44:55 +0100 Received: from 102.201.133.37.dynamic.jazztel.es ([37.133.201.102]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Feb 2015 13:44:55 +0100 Received: from rasmus by 102.201.133.37.dynamic.jazztel.es with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Feb 2015 13:44:55 +0100 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@gnu.org torys.anderson@gmail.com (Tory S. Anderson) writes: > I have the followign table, which should speak for itself. First the > "cost" column needs to be calculated, which is hours * rate, and then > the "hrs" and "ttl" fields should be filled in based on sums of their > columns. However, I'm not sure why $cost isn't being evaluated; I've > tried it with column names as well as indices but unless I specify > each field individually (e.g. @3$5) I can't get a result here. Formula > debugging seems to ignore it, too. But I've been trying to follow the > example on the "advanced feature" page[1] as closely as possible; > what's the problem? > > | | Date | Hours | Rate | Cost | > | ! | | hours | rate | cost | > |---+-------------+-------+------+------| > | | February 9 | 4.00 | 38 | 0 | > | | February 10 | 4.00 | 38 | 0 | > | | February 11 | 4.00 | 38 | 0 | > | | February 12 | 4.00 | 38 | 0 | > | | February 13 | 4.00 | 38 | 0 | > |---+-------------+-------+------+------| > | | | 20. | | 0 | > | ^ | | hrs | | ttl | > #+TBLFM: $5=$hours*$rate::$hrs=vsum(@I..@II)::$ttl=vsum(@I..@II) I have no clue why, but this table works for me; the original one does not... | | Date | Hours | Rate | Cost | | ! | | hours | rate | cost | |---+-------------+-------+------+------| | # | February 9 | 4.00 | 38 | 152. | | # | February 10 | 4.00 | 38 | 152. | | # | February 11 | 4.00 | 38 | 152. | | # | February 12 | 4.00 | 38 | 152. | | # | February 13 | 4.00 | 38 | 152. | |---+-------------+-------+------+------| | # | | 20. | | 760. | | ^ | | hrs | | ttl | #+TBLFM: $5=$hours*$rate::$hrs=vsum(@I..@II)::$ttl=vsum(@I..@II) -- Dobbelt-A