emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] how to clear computed values


From: Cecil Westerhof
Subject: Re: [Orgmode] how to clear computed values
Date: Wed, 11 Jul 2007 09:22:01 +0200

Op di, 10-07-2007 te 20:38 +0200, schreef Cecil Westerhof:
> I have a table like:
>         |---------+---------+---------+--------+-------+----------+--------|
>         | kmstand |    km's | prijs/l | liters | prijs | prijs/km |   km/l |
>         |---------+---------+---------+--------+-------+----------+--------|
>         |  155111 |       0 |         |        |  0.00 |   -0.000 |  0.000 |
>         |  156146 |    1035 |   102.2 |  62.25 | 63.62 |    6.147 | 16.627 |
>         |         | -156146 |         |        |  0.00 |   -0.000 |  0.000 |
>         |---------+---------+---------+--------+-------+----------+--------|
>         #+TBLFM: $2='(and @-1$-1 $1 (- $1 @-1$-1));N::$5='(and $3 $4 (/ (* $3 
> $4) 100));N%.2f::$6='(and $2 $5 (/ (* $5 100) $2));N%.3f::$7='(and $2 $4 (/ 
> $2 $4));N%.3f
> 
> When there is nothing to display, there is now a '0' displayed, but I
> would prefer it to be empty. Is this possible?
> Also, why is prijs/km displayed as '-0.000'?
> And why is the last field of km's displayed as  '-156146'? I expected
> '0'.

I have been playing a little bit more and made this:
        
|------------+---------+--------+--------+--------+---------+---------+--------+-------+----------+--------|
        |      datum | kmstand |        |        |        |    km's | prijs/l | 
liters | prijs | prijs/km |   km/l |
        
|------------+---------+--------+--------+--------+---------+---------+--------+-------+----------+--------|
        |            |  155111 | 155111 | 155111 | 155111 |       0 |         | 
       |  0.00 |   -0.000 |  0.000 |
        | 2007-07-09 |  156146 | 155111 | 156146 | 156146 |    1035 |   102.2 | 
 62.25 | 63.62 |    6.147 | 16.627 |
        |            |         | 156146 |      0 |      0 | -156146 |         | 
       |  0.00 |   -0.000 |  0.000 |
        |            |         |      0 |      0 |      0 |       0 |         | 
       |  0.00 |   -0.000 |  0.000 |
        
|------------+---------+--------+--------+--------+---------+---------+--------+-------+----------+--------|
        #+TBLFM: address@hidden;N::$4=$2::$5='(and @-1$2 $2);N::$6='(if (and 
@-1$2 $2) (- $2 @-1$2) (0));N::$9='(and $7 $8 (/ (* $7 $8) 
100));N%.2f::$10='(and $6 $9 (/ (* $9 100) $6));N%.3f::$11='(and $6 $8 (/ $6 
$8));N%.3f

If you look at the km's column, I would expect that in the thirth row 0
would be displayed. (The else part.) But the negative value of @-1$2 is
displayed. I think this is a bug?

Also when adding the fields between kmstand an km's in the km formula
@-1$-1 did not change. I would expect it to change to @-1$-4. Or is
there a reason for this behaviour?

-- 
Cecil Westerhof <address@hidden>





reply via email to

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