Survey calculate percentage of one question/answer set using 2 dimensions
Hello all, I have this script and am trying to calculate the % of an answer based on the question
data:
LOAD * INLINE [
Choose your Functional Group, How long?, The purpose is clear, How likely is it that you would recommend tool?
F1, 0-6 months, Agree, 1
F1, 6 months-1 year, Strongly Agree, 3
F2, 0-6 months, Disagree, 4
F2, More than 1 year, Strongly Disagree, 6
F3, 0-6 months, Aggee, 10
F3, 6 months-1 year, Neutral, 6
];
DataLoad:
CrossTable(Question, Answer)
LOAD [Choose your Functional Group] as Function,
[How long?],
[The purpose is clear],
[How likely is it that you would recommend tool?]
Resident data;
Duration:
LOAD * INLINE [
DurationSortOrder,AnswerDuration
1,More than 1 year
2,0-6 months
3,6 months-1 year
];
drop table data;
exit script;
from this, I tried several dimensions and expressions
Dimension to get a specific question
D1 =if(Match(AnswerDuration,Answer),Answer)
D2 - Function
However to calculate the duration percent for that question, I get the wrong answers