From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: problem with empty column Date: Sat, 06 Jan 2018 11:23:08 +0000 Message-ID: <87wp0vfcyr.fsf@gmail.com> References: <87h8s0yaj5.fsf@mat.ucm.es> <87zi5sk5ru.fsf@gmail.com> <87lghcwk3f.fsf@mat.ucm.es> <87y3lcgy71.fsf@gmail.com> <87shbjv0wf.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXmZI-0001ng-1m for emacs-orgmode@gnu.org; Sat, 06 Jan 2018 06:23:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXmZE-0004Fu-Sm for emacs-orgmode@gnu.org; Sat, 06 Jan 2018 06:23:16 -0500 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:33635) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eXmZE-0004EA-Lb for emacs-orgmode@gnu.org; Sat, 06 Jan 2018 06:23:12 -0500 Received: by mail-wm0-x22b.google.com with SMTP id g130so9564621wme.0 for ; Sat, 06 Jan 2018 03:23:12 -0800 (PST) Received: from t3610 ([2.31.141.225]) by smtp.gmail.com with ESMTPSA id t20sm6681246wra.16.2018.01.06.03.23.09 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 06 Jan 2018 03:23:10 -0800 (PST) In-Reply-To: <87shbjv0wf.fsf@mat.ucm.es> (Uwe Brauer's message of "Sat, 06 Jan 2018 09:37:04 +0100") 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 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Saturday, 6 Jan 2018 at 09:37, Uwe Brauer wrote: > The column of reference is E1 per default, which is the second one. The Ah, okay, I understand now. Thanks. I see that you have been given a solution elsewhere using vmean but you could also consider adding "N" to the expression (i.e. after ;E). This would make the empty entries be treated as having a 0 value so your check for nan would no longer work but you could always check for 0... The following works: | Name | E1 | E2 | E3 | E4 | Res | |--------+----+----+----+----+-----| | Entry1 | | | | | NP | | Entry2 | 10 | 20 | 30 | 40 | 10 | | Entry3 | 10 | | 20 | 30 | 6 | #+TBLFM: $6=3Dif("$2" =3D=3D "(0)" , string("NP"),($2+$3+$4+$5)/10);EN HTH, eric =2D-=20 Eric S Fraga via Emacs 27.0.50, Org release_9.1.6 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWlCxnAAKCRDIkZPY//z2 ff4GAJ0YMx7fRI02xt/SAgg44VYSnsr6XQCggYGaTC04yQnPvfTORB3BtwZdp5I= =EHHL -----END PGP SIGNATURE----- --=-=-=--