From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell Adams Subject: Calculated Properties & Column View Totals Date: Thu, 15 Mar 2012 15:38:09 -0500 Message-ID: <20120315203809.GV31713@x201> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8HRN-0000s9-JO for emacs-orgmode@gnu.org; Thu, 15 Mar 2012 16:38:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8HRL-0004Ex-7S for emacs-orgmode@gnu.org; Thu, 15 Mar 2012 16:38:29 -0400 Received: from jack.asmallorange.com ([74.52.119.82]:46939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8HRL-0004Es-1F for emacs-orgmode@gnu.org; Thu, 15 Mar 2012 16:38:27 -0400 Received: from 206.180.155.43.adsl.hal-pc.org ([206.180.155.43] helo=localhost) by jack.asmallorange.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1S8HRG-000dRs-VV for emacs-orgmode@gnu.org; Thu, 15 Mar 2012 16:38:23 -0400 Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode 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