From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: Re: problem with lookup, count several string in one (or more) columns.
Date: Tue, 05 Jul 2016 12:22:08 +0000 [thread overview]
Message-ID: <874m84gtqn.fsf@mat.ucm.es> (raw)
In-Reply-To: 84r3b8pohn.fsf@gmail.com
> Uwe Brauer <oub@mat.ucm.es> writes:
> What about
> #+TBLFM: @>$3='(+ (length(org-lookup-all "NP" '(@2$2..@-1$3) nil)) (length(org-lookup-all "MH" '(@2$2..@-1$3) nil)));
> ?
You mean
| group | round 1 | round 2 |
|-------+---------+---------|
| A | | 2.4 |
| B | 4.7 | 11 |
| C | | MH |
| D | 5 | |
| E | | 7.2 |
| F | 3.2 | 4.3 |
| G | NP | 4.4 |
| H | NP | 8 |
| I | NP | 8 |
|-------+---------+---------|
| total | MH | 4 |
#+TBLFM: @>$3='(+ (length(org-lookup-all "NP" '(@2$2..@-1$3) nil)) (length(org-lookup-all "MH" '(@2$2..@-1$3) nil)));
That gives
| total | MH | 4 |
But I want
| total | MH | 1 |
| total | NP | 3 |
regards
Uwe
next prev parent reply other threads:[~2016-07-05 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 19:57 problem with lookup, count several string in one (or more) columns Uwe Brauer
2016-07-05 6:50 ` Marco Wahl
2016-07-05 12:22 ` Uwe Brauer [this message]
2016-07-05 13:47 ` Marco Wahl
2016-07-05 14:53 ` Uwe Brauer
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874m84gtqn.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.