- Posts: 42
- Thank you received: 3

# Sum in Array Dual Scale

1 year 2 months ago #190793
by ch123

*Sum in Array Dual Scale*was created by

*ch123*

Hi all.

Hopefully you can help me again

I have a question of type Array Dual Scale (30 items, scale1: today, scale2: last week) and I want to calculate the sum of different subscales seperated by the two scales.

I thought about doing this with questions of type equation and expression manager. But I can't use the expression {sum(VAR01,VAR02,VAR03)} - probably because of the dual scale (that makes sense to me, because you haven't defined the scale). Is there a possibility to get the different sums? Or is it possible to have two single scale array questions and put them together with coding or something?

Thank you!

Hopefully you can help me again

I have a question of type Array Dual Scale (30 items, scale1: today, scale2: last week) and I want to calculate the sum of different subscales seperated by the two scales.

I thought about doing this with questions of type equation and expression manager. But I can't use the expression {sum(VAR01,VAR02,VAR03)} - probably because of the dual scale (that makes sense to me, because you haven't defined the scale). Is there a possibility to get the different sums? Or is it possible to have two single scale array questions and put them together with coding or something?

Thank you!

The topic has been locked.

1 year 2 months ago #190801
by holch

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.

No support via private message.

Replied by

*holch*on topic*Sum in Array Dual Scale*
You need to access the dual scale differently:

manual.limesurvey.org/Expression_Manager...tion_with_two_scales

It has 3 dimensions:

1. Subquestions

2. Answeroptions

3. Scale

So let's assume you have 3 subquestions and for these 3 subquestions (SQ1, SQ2 and SQ3) you want to have the sum of the answer options given for today (1st scale = 0).

Then you would need something like this:

Not tested though. You might have to play around with this a little bit.

manual.limesurvey.org/Expression_Manager...tion_with_two_scales

It has 3 dimensions:

1. Subquestions

2. Answeroptions

3. Scale

So let's assume you have 3 subquestions and for these 3 subquestions (SQ1, SQ2 and SQ3) you want to have the sum of the answer options given for today (1st scale = 0).

Then you would need something like this:

`{sum(QuestionCode_SQ1_0, QuestionCode_SQ2_0,QuestionCode_SQ3_0)}`

Not tested though. You might have to play around with this a little bit.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.

No support via private message.

The following user(s) said Thank You: ch123

The topic has been locked.

1 year 2 months ago #190803
by Joffm

Replied by

*Joffm*on topic*Sum in Array Dual Scale*
Hi,

in my opinion the best you can do is:

Or just create a survey with this question you want to inspect.

Joffm

in my opinion the best you can do is:

- Activate the survey
- Enter some well defined data
- In the answer table you see how the results are stored and which code to use
- Deactivate the survey
- Proceed

Or just create a survey with this question you want to inspect.

Joffm

*Volunteers are not paid.*

Not because they are worthless, but because they are priceless

Not because they are worthless, but because they are priceless

The following user(s) said Thank You: ch123

The topic has been locked.

1 year 2 months ago #190811
by ch123

Replied by

*ch123*on topic*Sum in Array Dual Scale*
Thank you both! Really nice community

It was easier than expected. Actually it worked with the "_0" at the end for the first scale and "_1" for the second scale.

It was easier than expected. Actually it worked with the "_0" at the end for the first scale and "_1" for the second scale.

**So, here's the solution for someone with the same problem:**```
1. scale: {sum(Q1_SQ1_0, Q1_SQ2_0,Q1_SQ3_0,...)}
2. scale: {sum(Q1_SQ1_1, Q1_SQ2_1,Q1_SQ3_1,...)}
```

The topic has been locked.