Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ahamada
Contributor III
Contributor III

Calculate a score

Hello comunity,

I have a table that looks like the table below. In this table we have questions (N1, N2, N3 and N4) of which N1 has 3 questions, N2 one question, N3 one question and N4 2 questions.
The answers are noted as follows:
a good answer to a question:
N1 is worth 0.33 (correct answers to the 3 questions N1 are worth 1).
N2 is 1
N3 is 1
N4 is worth 0.5 (correct answers to the 2 questions N4 are worth 1).

I would like to calculate the score by using the method below:

1. If all three criteria of N1 OK, score=1. If only one OK, score=0.33. If only two OK, score=0,66. (despite results of higher levels criteria -L2,L3 and L4)

2. If score=1, take into account criteria N2, if OK, score=2, if not score=1. (despite results of higher levels criteria -L3 and L4)

3. If score = 2 take into account criteria N3, if OK, score =3, if not score =2. (despite results of higher levels criteria -L4)

4. If score=3, take into account criteria N4, if both OK, score =4, if only one OK, score 3.5, if both KO, score 3.

Id_answer Region DateAnswer Departement Qestion Answer
id1 xxx xxxx xxxx N1 OK
id1 xxx xxxx xxxx N1 OK
id1 xxx xxxx xxxx N1 OK
id1 xxx xxxx xxxx N2 OK
id1 xxx xxxx xxxx N3 OK
id1 xxx xxxx xxxx N4 OK
id1 xxx xxxx xxxx N4 OK
id2 xxx xxxx xxxx N1 OK
id2 xxx xxxx xxxx N1 KO
id2 xxx xxxx xxxx N1 OK
id2 xxx xxxx xxxx N2 OK
id2 xxx xxxx xxxx N3 OK
id2 xxx xxxx xxxx N4 OK
id2 xxx xxxx xxxx N4 OK
id3 xxx xxxx xxxx N1 OK
id3 xxx xxxx xxxx N1 OK
id3 xxx xxxx xxxx N1 OK
id3 xxx xxxx xxxx N2 KO
id3 xxx xxxx xxxx N3 OK
id3 xxx xxxx xxxx N4 OK
id3 xxx xxxx xxxx N4 OK
Labels (2)
2 Replies
MendyS
Partner - Creator III
Partner - Creator III

Hi @Ahamada

that classic group by and count on the Answer field,
do something like:

Load Id_answer, Qestion, count(Answer) as NumAnswer

group by Id_answer, Qestion;

and then that will be a lot easier...

Ahamada
Contributor III
Contributor III
Author

Hi @MendyS ,

I don't understand what "Count(answer)" will help us in this case.
could you explain your reasoning?