emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Difference between two rows


From: Michael Brand
Subject: Re: [O] Difference between two rows
Date: Sun, 1 Jun 2014 13:57:09 +0200

Hi Cecil

On Sun, Jun 1, 2014 at 1:38 PM, Cecil Westerhof <address@hidden> wrote:
> 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 |
> |-------+------------|

For such cases I prefer vlen():

#+TBLFM: $2 = if(vlen(@address@hidden) == 1, string(""), $1 - @-1$1); E

Michael



reply via email to

[Prev in Thread] Current Thread [Next in Thread]