emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Flávio <flaviostz@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Formulas in columnview table
Date: Tue, 03 Feb 2009 07:13:28 -0800	[thread overview]
Message-ID: <87iqnrft9j.fsf@gmail.com> (raw)
In-Reply-To: <loom.20090203T131700-913@post.gmane.org> ("Flávio"'s message of "Tue, 3 Feb 2009 13:46:08 +0000 (UTC)")

Flávio <flaviostz@gmail.com> writes:

> I am using columnview table now to get some summaries of worked hours and
> quantity balance as well. This is one example showing a quantity of quoted
> computers and the real sold quantity:
>
> |   | ITEM                    | Quotation | Sold | 
> |---+-------------------------+-----------+------+
> |   | ** Computers            |      10   |  7   |
> |---+-------------------------+-----------+------+
>
> Is there any way to automatically insert a fórmula in a third column? For
> example, I could insert a "Difference" column and make Sold - Quotation and get
> this result:
>
> |   | ITEM                    | Quotation | Sold | Difference |
> |---+-------------------------+-----------+------+------------|
> |   | ** Computers            |      10   |  7   |     -3     |
> |---+-------------------------+-----------+------+------------|
>

org-collector is useful when you want to perform calculations on
properties *before* they are entered into a columnview type table.
Using org-collector a dblock like the following should work.

#+BEGIN: propview :cols (ITEM Quoted Sold (- Sold Quoted))
#+END:

The downside of org-collector is that it is not really part of org-mode,
and it doesn't have many of the nice features of columnview tables, like
the specification of column titles.  You can grab a copy of
org-collector.el from here
http://github.com/eschulte/org-contrib/raw/df909c94083b882d9a0f703a4314e0342dc5343f/org-collector.el

Cheers -- Eric

      reply	other threads:[~2009-02-03 15:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 13:46 Formulas in columnview table Flávio
2009-02-03 15:13 ` Eric Schulte [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=87iqnrft9j.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=flaviostz@gmail.com \
    /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).