Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am trying to understand the behaviour or current selections on Aggr(). For example I have the following data set:
LOAD * INLINE [
Test, Target, SessionNum, Student
A, 10, 1, John
A, 10, 2, Mark
A, 10, 3, Mark
B, 58, 1, John
B, 58, 2, Kelly
C, 123, 1, Mark
D, 77, 1, Mark
D, 77, 2, John
D, 77, 3, John
D, 77, 4, Kelly
D, 77, 5, John
E, 947, 1, John
E, 947, 2, Kelly
F, 3, 1, Kelly
];
Then I created a straight table with the following:
Dimension: [Student]
Expression: Sum({1} Aggr(Avg([Target]), [Test]))
The result is:
John | 1015
Kelly | 3
Mark | 200
I can understand how these numbers come about. But when I select just one Student, "Mark", the result becomes this:
John | 10
Mark | 200
And I can't quite understand why this is so. Is it that QlikView will first look at what Tests that are filtered according to my Student selection (A, C, and D), and then go back to the original data set and pick only these Tests and pass them to the Aggr() function?
Thanks in advance!
Thanks this is helpful. I shall explore more to try to get a better understanding.