Discussion Board for collaboration related to QlikView App Development.
i have a table two columns 1) ClientId and 2) ClientType
there are some cases the same ClientId appears with different ClientType also e.q
ClientId , ClientType
1, ABC , 10
2, ABC , 20
3, XYZ , 10
i want to remove the duplicate ClientId on the basis of which ClientType i prefer to keep and which not.
There are many ways for this but what is your expected out put here you can also create a flag field also to find duplicates and in front end remove them by using SET analysis.
LOAD ClientId,ClientType,RowNo() as Rid;
LOAD * INLINE [
Count(ClientId) as Count
Group By ClientId;
If(Count > 1,'Duplicate Records','No Duplicates') as Details
DROP Table CountTable;
As per the record level is it not duplicate, but as per ClientId level it is duplicate. As per the business rules a ClientId can be belongs to any specific ClientType only. but due to there is no Validation check and there is no any master regarding ClientType this is happening and i have to finalized the Master for ClientType and ClientId & ClientType Relationship.