Welcome to the LimeSurvey Community Forum

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

how to write the subquestion sum()*?

  • iscar
  • iscar's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 10 months ago - 8 years 10 months ago #119881 by iscar
i have a array question, q1_SQ001,q1_SQ002...q1_SQ099.
i need to get a sum of those subquestions by condition:
if subquestion==1, q1_SQ==q1_SQ
if subquestion!=1, q1_SQ==q1_SQ*1.5
then the em is :
{sum(if(q1_SQ001==1,q1_SQ001,q1_SQ001*1.5),if(q1_SQ002==1,q1_SQ002,q1_SQ002*1.5)....if(q1_SQ099==1,q1_SQ099,q1_SQ099*1.5))}

how to write above long long sentence as:{sum(if(that.q1==1,that.q1,that.q1*1.5))}?
Last edit: 8 years 10 months ago by iscar.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose