Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
giovanneb
Creator II
Creator II

generate flags in the table after treatment

Hello community, I need help on this issue below

ID_DOCID_CD_MOVDATEVLFLAG
80425890101/1/20121500
80425890102/1/20121500
80425890104/1/20121500x
80425890104/1/20121700x
80425890114/1/2012-1500x
80425890114/1/2012-1700x
80425890104/2/20121500
80425890104/2/20121700
1006350105/1/20121500x
1006350115/1/2012-1500x
1006350105/2/20121500

I have a table of payments, where I have a table of payments, where ID_CD_MOV = 10 (Payments done) and ID_CD_MOV = 11 (Payments reversed).

I have a table of payments, where my problem must disregard the payments reversed and disregard previous payments related to the reversal, as they have done again after receiving the cancelation

The table clearly shows what I need, the flag field does not exist in the database, just put as a reference to the need

Thanks

1 Solution

Accepted Solutions
calvindk
Creator III
Creator III

I worked a bit of off the examples provided and this one works in this specific case.

However the arbitrary selection of what to match is causing me some trouble, as well as the possibility of having multiple same value negatives per id.

Might be a starting point for a real solution.

Best wishes

View solution in original post

3 Replies
Gysbert_Wassenaar

This reversal doesn't have a matching payment afaict.

80425890114/1/2012-1200x

If -1200 should be -1700 then I can match it. See attached example.


talk is cheap, supply exceeds demand
giovanneb
Creator II
Creator II
Author

-1200 I have not had time to assemble wrong in the example, you are correct in that case held that the dates are the same at the time of making the comparison and if the dates are different example:

ID_DOCID_CD_MOVDATEVLFLAG
804258951001/01/20121000
804258951002/01/20121000
804258951004/01/20121000x
804258951004/01/20121200x
804258951105/01/2012-1000x
804258951105/01/2012-1200x
804258951007/02/20121000
804258951007/02/20121200
10063701005/01/20121000x
10063701105/01/2012-1000x
10063701008/02/20121000
calvindk
Creator III
Creator III

I worked a bit of off the examples provided and this one works in this specific case.

However the arbitrary selection of what to match is causing me some trouble, as well as the possibility of having multiple same value negatives per id.

Might be a starting point for a real solution.

Best wishes