Discussion Board for collaboration on QlikView Scripting.
Hi QV expert
I have a student table with students' 3 scores for different projects in 2 periods. see table below. I want to be able to filter out students with projects that have a score change in the two period for any one of the scores.
Can someone help with the script?
Student table: Highlighted are the score change
The script should return
Go to Solution.
May be this to create a flags:
LOAD [Project ID],
(html, codepage is 1252, embedded labels, table is @1);
If([Project ID] = Peek('Project ID') and [Student ID] = Peek('Student ID'),
If(Peek('Score 1') <> [Score 1] or Peek('Score 2') <> [Score 2] or Peek('Score 3') <> [Score 3], 1, 0)) as Flag
Order By [Project ID], [Student ID], Period;
DROP Table Table;
LOAD your data in using a CROSSTABLE LOAD to transform your data into a straight table:
CrossTable (ScoreID, Score, 3)
LOAD [Project ID],[Student ID], Period, [Score 1], [Score 2], [Score 3]
Project ID Student ID Score 1 Score 2 Score 3 Period
Project A Student 1 A B B Current
Project A Student 2 C C B Current
Project B Student 1 A D D Current
Project B Student 2 B C C Current
Project B Student 3 D D B Current
Project A Student 1 A B B Prior
Project A Student 2 C D B Prior
Project B Student 1 A D D Prior
Project B Student 2 C C C Prior
Project B Student 3 D D A Prior
] (delimiter is '\t');
Then create a straight table with two dimensions and one expression: