emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thierry Banel <tbanelwebmin@free.fr>
To: emacs-orgmode@gnu.org
Subject: Re: Difference between two rows
Date: Sun, 01 Jun 2014 19:57:17 +0200	[thread overview]
Message-ID: <538B697D.4070604@free.fr> (raw)
In-Reply-To: <CAG-LmmDoDUaKnPqiBzVsmJKnLB80cWwJdT6WnTovZsibh2efNg@mail.gmail.com>

Le 01/06/2014 13:38, Cecil Westerhof a écrit :
> 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 |
> |-------+------------|
>
>
> -- 
> Cecil Westerhof
|   | value | difference |
|---+-------+------------|
|   |    12 |            |
| # |    15 |          3 |
| # |    83 |         68 |
| # |    87 |          4 |
| # |    85 |         -2 |
|---+-------+------------|
#+TBLFM: $3=$2-@-1$2

The first row does not have a #, and therefore it is not computed.

--
Thierry

      parent reply	other threads:[~2014-06-01 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01 11:38 Difference between two rows Cecil Westerhof
2014-06-01 11:57 ` Michael Brand
2014-06-01 12:24   ` Cecil Westerhof
2014-06-01 13:18     ` Michael Brand
2014-06-01 14:12       ` Cecil Westerhof
2014-06-01 17:57 ` Thierry Banel [this message]

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=538B697D.4070604@free.fr \
    --to=tbanelwebmin@free.fr \
    --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).