From mboxrd@z Thu Jan 1 00:00:00 1970 From: Qiang Fang Subject: Org table: how to reference part of the rows Date: Sat, 16 Dec 2017 19:24:52 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e08241978b32e0f0560735d0e" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQAaO-0002EI-Oc for emacs-orgmode@gnu.org; Sat, 16 Dec 2017 06:24:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQAaN-0003mE-Vh for emacs-orgmode@gnu.org; Sat, 16 Dec 2017 06:24:56 -0500 Received: from mail-pg0-x235.google.com ([2607:f8b0:400e:c05::235]:45537) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQAaN-0003j4-OF for emacs-orgmode@gnu.org; Sat, 16 Dec 2017 06:24:55 -0500 Received: by mail-pg0-x235.google.com with SMTP id m25so7319708pgv.12 for ; Sat, 16 Dec 2017 03:24:54 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --089e08241978b32e0f0560735d0e Content-Type: text/plain; charset="UTF-8" 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 --089e08241978b32e0f0560735d0e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: base64 PGRpdiBkaXI9Imx0ciI+VGhlIGxhc3QgY29sdW1uIGlzIHRoZSByYXRpbyBiZXR3ZWVuIGNvbHVt biBiIGFuZCBhLCB0aGUgbGFzdCByb3cgaXMgdGhlIHN1bSBvZjxicj5lYWNoIHJvdywgdGhlIHNl Y29uZCBmb3JtdWxhIG9ubHkgYXBwbGllcyBmcm9tIHRoZSBzZWNvbmQgcm93IHRvIHRoZSByb3cg YmVmb3JlPGJyPmxhc3Qgcm93LiBUaGUgdGFibGUgdGhhdCBkb2VzbiYjMzk7dCB3b3JrIGlzOjxi cj48YnI+wqDCoMKgIHzCoMKgwqDCoCB8wqDCoMKgwqDCoCBhIHzCoMKgwqDCoCBiIHzCoMKgwqDC oMKgIHJhdGlvIHw8YnI+wqDCoMKgIHzCoMKgwqDCoCB8wqAgMC43OTcgfCAwLjc4MCB8wqDCoMKg wqDCoMKgwqDCoMKgwqDCoCB8PGJyPsKgwqDCoCB8wqDCoMKgwqAgfMKgIDAuNzQ0IHwgMC43MzAg fMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgfDxicj7CoMKgwqAgfMKgwqDCoMKgIHwgMTIuNzA3IHwg Mi4zODQgfMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgfDxicj7CoMKgwqAgfCBzdW0gfCAxNC4yNDgg fCAzLjExNCB8IDAuOTIwNDA5ODggfDxicj7CoMKgwqAgfCBewqDCoCB8wqDCoMKgwqDCoCB4IHzC oMKgwqDCoCB5IHzCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIHw8YnI+wqDCoMKgICMrdGJsZm06ICR4 PXZzdW0oQDIuLkAtMSkgOjogJHk9dnN1bShAMy4uQC0xKTxicj7CoMKgwqAgIyt0YmxmbTogJDQg PSAoJDMgLyAkMikgKiAxMDAgPGJyPjxicj48L2Rpdj4NCg== --089e08241978b32e0f0560735d0e--