Welcome, Guest
Username: Password: Remember me

TOPIC: how to use sumifop in EM?

how to use sumifop in EM? 1 year 3 months ago #90951

  • bebs
  • bebs's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 48
  • Thank you received: 2
  • Karma: 0
Hello.

What is the syntax of first argument (op) in sumifop(op, val1, val2,..)?
docs.limesurvey.org/Expression+Manager#Implemented_Functions


My answer label set is composed of a few "valid" results (eg 0->4) and a few possible answers that should give me different "error codes", such as "I don't know" or "not applicable" or "I don't understand the question".

I would like to sum up the answers of different questions using the same set, excluding automatically the error codes.

I guess one possible way is to associate to error codes negative values, and filter them out of the sum using sumifop, as in:
{sumifop(">0",Q1.value,Q2.value,Q3.value)} ... but I cannot figure the syntax of the first "op" argument: with hyphen it does not filter, without hyphens it does not parse.

Any pointer welcome, thanks.
Bebs.
The administrator has disabled public write access.

Re: how to use sumifop in EM? 1 year 3 months ago #90952

  • bebs
  • bebs's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 48
  • Thank you received: 2
  • Karma: 0
Sorry, I didn't read the documentation properly, as the right syntax is
number sumifop(op, value, arg1, arg2, ... argN)

I should have used
sumifop(">", 0, Q1.value, Q2.value...)

which works perfectly. thank you VERY much for this great feature!
Last Edit: 1 year 3 months ago by bebs.
The administrator has disabled public write access.

how to use sumifop in EM? 6 months 2 weeks ago #100375

  • limesun
  • limesun's Avatar
you can use sum(group),i am not sure ls has this.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.097 seconds
Donation Image