Hi,
before I have a closer look, I ask:
Why do you use alphanumerical codes and have to use this equation?
{sum(if(Q01_SQ001.code == "A01", 0, 0),if(Q01_SQ001.code == "A02", 1, 0),if(Q01_SQ001.code == "A03", 2, 0),if(Q01_SQ001.code == "A04", 3, 0),if(Q01_SQ001.code == "A05", 4, 0),...
instead of using numerical codes (it is a scale)
So it's only
{sum(Q01_SQ001.NAOK,Q01_SQ003.NAOK,...)}
And to clarify:
In our production survey we have 30 fields and we would like to display the top 6 scoring RPT* questions using the Condition field.
What are your 30 fields?
Is it Q01 - Q30, or is it 30 different ways to calculate a score of Q1? I see that in this example you only sum subquestions 1,3,4,7 9,10
And is the split constant
low: 0-13
mod: 14-18
high: 19+
My rough idea is:
calculate the maximum (max1) of scores (function "max()")
calculate the maximum (max2) of scores without max1.
calculate the maximum (max3) of scores without max1 and max2.
...
to get the sixth highest score.
Now display all scores that are equal or higher.
Joffm
Can't you provide a sample, where we see (let's say) 8 "fields" and may show how to display the three highest?