Discussion Board for collaboration related to QlikView App Development.
I am trying to find duplicate records within my table. I have created a flag that successfully identifies the duplicates, however, there is a null value in the 2nd row of the duplicate record.
How can I have the flag show a 1 for both records while leaving a null value, or 0, in the distinct account?
Here is my script and an example of the output I currently have.
if(Peek(Account) = Account,1) as DuplicateFlag
Order by Account Asc;
DROP Table Events;
EDIT: What I am trying to show is this:
Thank you in advance for your help
Go to Solution.
(html, codepage is 1252, embedded labels, table is @1);
left join (Z)
load Date, Account, if(count(Account)>1,1,0) as DuplicateFlag
group by Date, Account;
If(Len(Trim(DuplicateFlag)) = 0, 0, DuplicateFlag) as DupFlag;
DROP Field DuplicateFlag;
RENAME Field DupFlag to DuplicateFlag;
Thank you for the quick response Sunny.
This is better, however there is still a 0 for account1.
What I'm trying to show is this:
Fantastic, this works!
Thank you so much maxgro!