Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I inherited a number of Qlikview reports from my predecessors.
One of the reports contains a table with receipt records, including a unique ID, a Sales number, Datetime and various other sales fields.
It's come to light that there is a scenario in which existing receipts are reprinted and therefore reprocessed with another unique id causing a duplicate sales number record in the table.
The end user has requested a way to filter out all of the duplicate rows from the table. How can I identify the earliest record based on the datetime, where there are duplicate Sales Numbers and filter out the other duplicates. The table currently uses the dimension of the unique ID.
This depends upon whether you want both records in the data model or not, as if not, then in the script you could do an order by statement to order all the records then use peek() to check if the next record has the same receipt etc. and just grab the last one etc. If you need both records, then the other approach would be to use a flag field I think where a 'y' means that is the most current record and an 'n' means it is not, then use the y in the expressions etc., you may need to doe some Set Analysis in that case though. Sorry I cannot give you something more specific here, and you may get some further help if you can provide some sample data folks could actually see things, then they may be able to help you further, but hopefully this may get you on the right track.
Regards,
Brett