emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Qiang Fang <godblessfq@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Org table: how to reference part of the rows
Date: Sat, 16 Dec 2017 19:24:52 +0800	[thread overview]
Message-ID: <CAOHC6G8OPhY+0z3ee7cwZyoatgR44Ku+GSAwsrzoB2LoXX+CjQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

The last column is the ratio between column b and a, the last row is the
sum of
each row, the second formula only applies from the second row to the row
before
last row. The table that doesn't work is:

    |     |      a |     b |      ratio |
    |     |  0.797 | 0.780 |            |
    |     |  0.744 | 0.730 |            |
    |     | 12.707 | 2.384 |            |
    | sum | 14.248 | 3.114 | 0.92040988 |
    | ^   |      x |     y |            |
    #+tblfm: $x=vsum(@2..@-1) :: $y=vsum(@3..@-1)
    #+tblfm: $4 = ($3 / $2) * 100

[-- Attachment #2: Type: text/html, Size: 718 bytes --]

             reply	other threads:[~2017-12-16 11:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-16 11:24 Qiang Fang [this message]
2017-12-17 15:53 ` Org table: how to reference part of the rows Eric S Fraga
2017-12-18  1:04   ` Qiang Fang

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=CAOHC6G8OPhY+0z3ee7cwZyoatgR44Ku+GSAwsrzoB2LoXX+CjQ@mail.gmail.com \
    --to=godblessfq@gmail.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).