From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: Re: how to exclude certain row values from calculation in a table
Date: Mon, 06 Nov 2023 20:58:28 +0100 [thread overview]
Message-ID: <877cmu8xi3.fsf@mat.ucm.es> (raw)
In-Reply-To: 6549349a.5d0a0220.f89cb.1866@mx.google.com
[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]
Hi Bruno
> Hi Uwe,
> Uwe Brauer <oub@mat.ucm.es> writes:
> ...
> You could use 'vmask' to mask the values you don't want.
> Here is an example using vmask:
> | | Price |
> |----------------+--------|
> | 1 | 10.98 |
> | | 11.90 |
> | | 19.98 |
> | | 13.79 |
> | 1 | 29.97 |
> | | 18.98 |
> | | 13.79 |
> | | 11.90 |
> | | 24.28 |
> |----------------+--------|
> | | 155.57 |
> | Total unmarked | 114.62 |
> | Total marked | 40.95 |
> | Check all | OK |
> #+TBLFM: @11$2=vsum(@I$2..@II$2);f2
> #+TBLFM: @12$2=vsum(vmask(map(<0 = #1>, @I$1..@II$1), @I$2..@II$2));f2NE
> #+TBLFM: @13$2=vsum(vmask(map(<1 = #1>, @I$1..@II$1), @I$2..@II$2));f2NE
> #+TBLFM: @14$2=string(if(@12$2+@13$2 = @11$2, "OK", "Oops!"))
Very cool, thank you very much indeed, this is very helpful
Uwe
--
I strongly condemn Hamas heinous atrocities on Israel, especially the despicable pogroms.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military.
I support the NATO membership of Ukraine.
I support the EU membership of Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
prev parent reply other threads:[~2023-11-06 20:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 15:51 how to exclude certain row values from calculation in a table Uwe Brauer
2023-11-06 18:46 ` Bruno Barbier
2023-11-06 19:58 ` Uwe Brauer [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=877cmu8xi3.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 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).