Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all ,
I need to count the matching characters in a field value
example: one exam 100 questions are there I have written 100 answers like
ABCACDAABC............ like 100
for this key also avaialbe in second table like
ABBBBCCCCC so my answer and key to match and check how many correct or wrong by letter by letter
in this ABCACDAABC --my answers
| | \ \ | | | \ \ \ \ in this example - 3 is correct answer count 7 is wrong count
ABBBBCCCCC -- key so First letter A-A 1st answer correct so count 1 [so how many correct answers that count and wrong count]
B-B correct so like that correct answer count and wrong answer count
Hi,
if you also want to extend the granularity of your analysis to include the different questions itself, then maybe one solution can be:
tabTests:
LOAD *
FROM [https://community.qlik.com/servlet/JiveServlet/download/1471086-322045/Match.xlsx] (ooxml, embedded labels, table is Sheet1, filters(Remove(Row, Pos(Top, 10)),Remove(Row, Pos(Top, 9)),Remove(Row, Pos(Top, 8))));
tabResults:
LOAD *
FROM [https://community.qlik.com/servlet/JiveServlet/download/1471086-322045/Match.xlsx] (ooxml, embedded labels, table is Tabl1);
tabAnswersTemp:
LOAD [Test Number],
Key
Resident tabTests;
Inner Join
LOAD [Test Number],
SSN,
[Answer Sheet/ Scores]
Resident tabResults;
tabAnswers:
LOAD *,
If(Answer=CorrectAnswer,Dual('Yes',1),Dual('No',0)) as IsCorrect;
LOAD SSN,
IterNo() as Question,
Mid(Key,IterNo(),1) as CorrectAnswer,
Mid([Answer Sheet/ Scores],IterNo(),1) as Answer
Resident tabAnswersTemp
While IterNo()<=Len(Key);
DROP Table tabAnswersTemp;
hope this helps
regards
Marco
Hi
in my original data it is showing duplicates how can I insert distinct in the expression?
example correct :40 means its showing 80