openmolecules.org

 
Home » DataWarrior » Functionality » Row Wise Sum
Row Wise Sum [message #1926] Tue, 13 June 2023 10:46 Go to previous message
amorrison
Messages: 36
Registered: March 2016
Member
Hi,

I'm trying to do a row wise sum of several columns within a Row to get a total value. In some cases there will be a empty value within a particular row. I've tried both sum(x,y,z) and also (x+y+z), this works fine for rows that are fully populated but for rows that have a empty value I get 'NAN' returned. Can I force it to ignore this and give me the sum even when there is a empty value?

In addition, is it possible to get a count of the populated values within the row? So for example, within the row 4 out of 5 of the columns have data, the number I would like to return is "4".

Just in case this is the issue, I am using an if statement to generate the numbers with an initial if(isempty(var),"","Do something else").

Many thanks,

Angus


 
Read Message
Read Message
Read Message
Previous Topic: Unable to Create New Form
Next Topic: is it possible to find text
Goto Forum:
  


Current Time: Tue Jun 18 18:22:13 CEST 2024

Total time taken to generate the page: 0.03947 seconds