Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

how to use sumifop in EM?

  • bebs
  • bebs's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 2 months ago #90951 by bebs
how to use sumifop in EM? was created by bebs
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 topic has been locked.
  • bebs
  • bebs's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 2 months ago - 11 years 2 months ago #90952 by bebs
Replied by bebs on topic how to use sumifop in EM?
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: 11 years 2 months ago by bebs.
The topic has been locked.
  • limesun
  • limesun's Avatar
  • Visitor
  • Visitor
10 years 5 months ago #100375 by limesun
Replied by limesun on topic how to use sumifop in EM?
you can use sum(group),i am not sure ls has this.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose