emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Russell Adams <RLAdams@AdamsInfoServ.Com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Calculated Properties & Column View Totals
Date: Thu, 15 Mar 2012 15:38:09 -0500	[thread overview]
Message-ID: <20120315203809.GV31713@x201> (raw)

I was moving my budget into Org, and while trying to make it work via
column view and properties I ran into two major impediments.

First, properties can't be calculated from one another ala spreadsheet
or elisp (ie: Property C = Property A + Property B). Thus I had to add
conversion to a dynamic block capturing the column view as formulas.

Second, though column view and captured columns support totaling by
tree hierarchy (ie: parent shows sum of children), I can't add a total
row to the bottom of the dynamic blocks that is preserved across
updates.

Here's a sample:

* Summaries

#+BEGIN: columnview :hlines 3 :id "Budget"
| ITEM                        | VENDOR | DUE | FREQ |  AMOUNT | BIMONTHLY | MONTHLY |    YEARLY |
|-----------------------------+--------+-----+------+---------+-----------+---------+-----------+
| *** Optional                |        |     |      | -250.00 |   -250.00 | -250.00 |   -250.00 |
| **** TODO Russell Fun Money |        |   1 |  0.5 | -250.00 |   -250.00 | -500.00 |  -6000.00 |
#+TBLFM: $6=$5*(1/$4)/2;%.2f::$7=$5*(1/$4);%.2f::$8=$5*(1/$4)*12;%.2f
#+END:

No entry has a BIMONTHLY, MONTHLY, or YEARLY property. I used that to
create the columns for my formulas so that I can populate those
numbers. The parent has the wrong sum because it is using the property
values, not summing from the spreadsheet calculation.

* Budget Items
  :PROPERTIES:
  :COLUMNS:  %25ITEM %15VENDOR %3DUE %3FREQ %AMOUNT{+;%.2f} %BIMONTHLY %MONTHLY %YEARLY
  :ID:       Budget
  :END:

** Expenses
   :PROPERTIES:
   :FREQ:    1
   :END:

*** Optional

**** TODO Russell Fun Money
   :PROPERTIES:
   :DUE:      1
   :AMOUNT:   -250.00
   :FREQ:     0.5
   :END:

I've reverted to using spreadsheet with hyperlinks for items so I can
keep notes... I really thought that column view would be superior
though.

Perhaps this will inspire some new features.

Thanks.


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

                 reply	other threads:[~2012-03-15 20:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20120315203809.GV31713@x201 \
    --to=rladams@adamsinfoserv.com \
    --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).