Page:1

## Average counting in a special way 6 months 3 weeks ago #89052

 ezechial OFFLINE Fresh Lemon Posts: 1 Karma: 0 Hello! I'm new in this forum and I did not find an suitable answer for my problem: Our company has a limesurvay, and I need to do a modification to one of our surveys. We need to count an average from answer in a way that it drops best, worse and a middle answers away ( in this way, we have charts to 4-10, and I need to drop 4, 7, and 10 off from average count) and count the average from the remaining numbers. Is this kind of modification possible and how I do it? The administrator has disabled public write access.

## Aw: Average counting in a special way 6 months 3 weeks ago #89148

 jelo OFFLINE Platinum Lime Posts: 345 Thank you received: 32 Karma: 13 You can change the php code to get these results. But updates would be a problem and you would need a special installation. Such operations are more suitable for statistical programs. Think about using R ( www.r-project.org ) on the Server to create a workflow for results. Perhaps some day Limesurvey will support R inside the results sections but currently I would change the workflow to an external program which does the reports. The administrator has disabled public write access.

## Re: Average counting in a special way 6 months 3 weeks ago #89158

 tpartner NOW ONLINE LimeSurvey Team Posts: 2951 Thank you received: 448 Karma: 254 There may be a cleaner way to do this with Expression Manager but if, for example, you had an array question with: - question code q1 - 4 sub-questions with codes 1-4 - answer options 4-10 You could use something like the following in an equation question (I put in line-breaks to make it easier to read): ```{sum( if(q1_1 > 0 && q1_1 != 4 && q1_1 != 7 && q1_1 != 10, q1_1, ''), if(q1_2 > 0 && q1_2 != 4 && q1_2 != 7 && q1_2 != 10, q1_2, ''), if(q1_3 > 0 && q1_3 != 4 && q1_3 != 7 && q1_3 != 10, q1_3, ''), if(q1_4 > 0 && q1_4 != 4 && q1_4 != 7 && q1_4 != 10, q1_4, '') ) / count( if(q1_1 > 0 && q1_1 != 4 && q1_1 != 7 && q1_1 != 10, 1, ''), if(q1_2 > 0 && q1_2 != 4 && q1_2 != 7 && q1_2 != 10, 1, ''), if(q1_3 > 0 && q1_3 != 4 && q1_3 != 7 && q1_3 != 10, 1, ''), if(q1_4 > 0 && q1_4 != 4 && q1_4 != 7 && q1_4 != 10, 1, '') )}``` Cheers, Tony LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project. The administrator has disabled public write access.
 Page:1
Moderators: DenisChenu, ITEd
Time to create page: 0.240 seconds