emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* table formula help...
@ 2014-12-06  5:42 Eric Abrahamsen
  2014-12-06  7:37 ` Thomas S. Dye
  2014-12-06  8:05 ` Michael Brand
  0 siblings, 2 replies; 34+ messages in thread
From: Eric Abrahamsen @ 2014-12-06  5:42 UTC (permalink / raw)
  To: emacs-orgmode

I never seem to use the spreadsheet unless it's some horribly
complicated thing I don't know how to calculate... Can someone lend me a
hand?

I'm calculating payment rates for contributors (actually translators) to
a magazine.

I've got two tables: The first is essentially a table of contents,
listing pieces with their character count (prose), or line count
(poetry), plus who translated it.

The second is a list of translators, with their total character/line
count, and how much they're owed.

I'm having a hell of a time getting the column formulas right:
specifically referencing one table from another. The first table looks
like this:

#+NAME: counts
| Piece          |  Chars | Lines | Translator       |
+----------------+--------+-------+------------------+
| 凤凰           |        |    84 | Austin Woerner   |
| 王血           |   6633 |       | Eric Abrahamsen  |
| 赵氏孤儿       |  16984 |       | Canaan Morse     |
| 山鬼故家       |        |    24 | Lucas Klein      |
| 寂静何其深沉   |        |    10 | Lucas Klein      |

And the second:

#+NAME: payments
#+CONSTANTS: prose=0.7 poetry=10
| Translator       | Total Chars | Total Lines | Payment |
|------------------+-------------+-------------+---------|
| Austin Woerner   |             |             |         |
| Eric Abrahamsen  |             |             |         |
| Canaan Morse     |             |             |         |
| Lucas Klein      |             |             |         |

In this second table, the formula I want for the "Total Chars" column
is:

"Set each row of $2 in table payments to the sum of all numbers in $2 of
remote(counts), if $2 is not empty, and if $4 of remote(counts) is equal
to $1 of table payments."

The formula for "Total Lines" would be exactly the same, but with the
$2s all switched to $3. I can handle adding up the amounts!

Is it possible to iterate over all the rows in another table like this?
Is there a better way I could be arranging my tables?

Thanks for any tips!

Eric

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2015-01-26  2:42 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-06  5:42 table formula help Eric Abrahamsen
2014-12-06  7:37 ` Thomas S. Dye
2014-12-06  8:05 ` Michael Brand
2014-12-06  8:32   ` Eric Abrahamsen
2014-12-06 22:49   ` Thierry Banel
2014-12-07  2:05     ` Eric Abrahamsen
2014-12-07  3:25     ` Eric Abrahamsen
2014-12-07  9:20       ` Thierry Banel
2014-12-07  9:40         ` Michael Brand
2014-12-07 10:02           ` Thierry Banel
2014-12-07 10:26             ` Michael Brand
2014-12-07 14:51               ` Thierry Banel
2014-12-07 16:13               ` Thierry Banel
2014-12-07 16:48                 ` Michael Brand
2014-12-08 21:12                   ` Thierry Banel
2014-12-08 22:32                     ` Thierry Banel
2014-12-10 21:08                       ` Michael Brand
2014-12-08  3:52             ` Eric Abrahamsen
2014-12-07  9:39       ` Michael Brand
2014-12-07  9:55         ` Thierry Banel
2014-12-07 21:57         ` Thierry Banel
2014-12-08 18:02           ` Michael Brand
2014-12-08 21:57             ` Thierry Banel
2014-12-09  5:54               ` Michael Brand
2014-12-09 18:12                 ` Thierry Banel
2014-12-09 19:01             ` Thierry Banel
2014-12-09 22:35               ` Thierry Banel
2014-12-10 21:06                 ` Michael Brand
2014-12-10 22:55                   ` Thierry Banel
2014-12-12 17:15                     ` Michael Brand
2014-12-12 21:04                       ` Thierry Banel
2014-12-13 18:27                         ` Michael Brand
2015-01-25 22:21       ` Thierry Banel
2015-01-26  2:48         ` Eric Abrahamsen

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).