emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Subhan Tindall <subhan.tindall@rentrakmail.com>
Cc: Org-Mode <emacs-orgmode@gnu.org>
Subject: Re: Simple question re: use of conditional in cell formula
Date: Thu, 20 Feb 2014 22:02:56 +0100	[thread overview]
Message-ID: <CALn3zoj=rhyo2WeqE0cL9gO7t4mE=qCHkKHfaCWSvLkv6RZypw@mail.gmail.com> (raw)
In-Reply-To: <CAKKEbDuF7DeMFBDtFfPkKJBBwCooOUgxgL8EcrPdRJDXKc9ZwQ@mail.gmail.com>

Hi Subhan

On Thu, Feb 20, 2014 at 9:05 PM, Subhan Tindall
<subhan.tindall@rentrakmail.com> wrote:
> What I'd like to do, but can't seem to find the proper syntax for,
> is use a conditional assignment so that when there is no Effort
> value only a blank, or "***", or similar is in the destination cell.
> SImilarly, when there is no value in one of the time sub-columns the
> corresponding cell is left blank

Are you looking for this?:

In the manual:
http://orgmode.org/manual/Formula-syntax-for-Calc.html

    if("$1" == "nan" || "$2" == "nan", string(""), $1 + $2); E

    Sum of the first two columns. When at least one of the input
    fields is empty the Org table result field is set to empty.

In action: Look at the page with the Worg tutorials and in the
spreadsheet section follow the link to the "Emacs Regression Test
(ERT) for Org tables" with example use cases for TBLFM:
http://orgmode.org/worg/org-tutorials/index.html#Spreadsheet
In the ERT it is test-org-table/empty-field, specifically "Test if
several fields are empty, else do a calculation".

> And, while I'm on the topic, is there anyway way to get a column in
> the clocktable to display the sum of all Effort estimates for it's
> displayed subtrees? IE like this:

I can't follow, maybe because I don't use clocking. Maybe you want to
use the hierarchical sum of a property in column view, here the
property "Effort". See
http://orgmode.org/manual/Column-attributes.html
and
http://orgmode.org/manual/Capturing-column-view.html

Michael

      reply	other threads:[~2014-02-20 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20 20:05 Simple question re: use of conditional in cell formula Subhan Tindall
2014-02-20 21:02 ` Michael Brand [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='CALn3zoj=rhyo2WeqE0cL9gO7t4mE=qCHkKHfaCWSvLkv6RZypw@mail.gmail.com' \
    --to=michael.ch.brand@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=subhan.tindall@rentrakmail.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).