New to Qlik Sense. Unsure how to do something. Probably SET or AGGR.
Greetings to Qlik Cognoscenti.
I have a question, and if anyone could shed light, I would appreciate it deeply. I'm a relative Qlik noob, and I thus apologize if my inquiry is overly simple.
The topic has to do with summing a field under certain conditions. I'd STRONGLY prefer to accomplish this in the data load rather than an active Qlik expression, for I fear the latter may hamper performance.
The goal here is to have the Qlik data load calculate the field ForwardCumulAmt. I provided that field for these nine sample rows merely to help explain the question. When in production, that data element will not be available. Rather, it must be calculated. Following is how the field is calculated for just a few rows:
For RecNum 1: Sum (11, -3, 6, 1) = 15
For RecNum 2: Sum (-3, 6, 1) = 4
Algorithm in words: Sum across Amount field where:
(A) Contract_Num is the same as Contract_Num for current record
(B) Period >= Period for current record
Two more examples:
For RecNum 7: Sum (-6, 20, 1) = 15
For RecNum 8: Sum (-6, 20, 1) = 15
NB: Please note that field Period for RecNum 7 and RecNum 8 happens to be thesame (i.e., 201803). This is not an error on my part. It is a necessary characteristic of the data.