From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: Re: Difference between two rows Date: Sun, 01 Jun 2014 19:57:17 +0200 Message-ID: <538B697D.4070604@free.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrA0c-0005V4-PR for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 13:57:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrA0U-0004WF-J0 for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 13:57:26 -0400 Received: from smtp4-g21.free.fr ([212.27.42.4]:22790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrA0U-0004W5-E3 for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 13:57:18 -0400 Received: from [IPv6:2a01:e35:2e21:def0:74b1:5203:2e77:f696] (unknown [IPv6:2a01:e35:2e21:def0:74b1:5203:2e77:f696]) by smtp4-g21.free.fr (Postfix) with ESMTP id 34DCB4C8093 for ; Sun, 1 Jun 2014 19:55:22 +0200 (CEST) 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@gnu.org Le 01/06/2014 13:38, Cecil Westerhof a =C3=A9crit : > I like to calculate in a table the difference between the value in a > field in the current row and the previous field. How would I do that? > > Something like: > |-------+------------| > | value | difference | > |-------+------------| > | 12 | | > | 15 | 3 | > | 83 | 68 | > | 87 | 4 | > | 85 | -2 | > |-------+------------| > > > --=20 > Cecil Westerhof | | value | difference | |---+-------+------------| | | 12 | | | # | 15 | 3 | | # | 83 | 68 | | # | 87 | 4 | | # | 85 | -2 | |---+-------+------------| #+TBLFM: $3=3D$2-@-1$2 The first row does not have a #, and therefore it is not computed. -- Thierry