Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Identify duplicate entries

Hi,

I am trying to create a filter box which shall identify duplicate entries in two columns (on the same row).

User NameUser Name2
TestNoTest
TestTest
Duplicate Duplicate

I need a text box or something equivalent that simply states 'Duplicates' based on the fact that there are two matches in the table above. Clicking 'Duplicates' should filter corresponding table.

Any assistance is highly appreciated!

/j

9 Replies
sunny_talwar

May be something like this:

LOAD Column1,

          Column2,

          If(Column1 = Colimn2, 'Duplicate', 'No-duplicate') as Check

FROM Source;

Not applicable
Author

Hi,

Maybe I should have been clearer. Its not during Load or in SQL, its in Qlikview. Unless you are referring to a functionality in Qlikview I have no clue about (quite a rookie)

sunny_talwar

QlikView has front end (UI) and back end (scripting). Are you trying to do this on the front end of the application?

Not applicable
Author

Yes. Need a filterbox in the sheet to identify the duplicates.

maxgro
MVP
MVP

maybe a listbox with this expression

=[User Name] = [User Name2]

Not applicable
Author

That kind of works, much the same way as my other one;

=if( = , 'Self Assignment', 'No Self Assignment')

But somehow it still pulls in other rows. However, the rows it do pull in have the same User Name and Changed By name as the ones that do match.

Example:

User Name Changed By

Anonymous
Not applicable
Author

One way to achieve this would be to add a flag_column in the table (load script) that compares the User Name and Changed by Name columns. Using this flag_column we can control selections and then using a variable in the UI to toggle the buttons. Take a look at the screenshot and the attached .qvw

Screen1.JPG

Screen2.JPG

Tx

Nakul

Not applicable
Author

Hi,

Thanks for this. However, I am unsure how I can use this so I load data from SQL-table? I understand if you want to add columns and fields manually, but that’s not possible in my case.

Any chance you can assist on that?

Thanks again,

/j

Anonymous
Not applicable
Author

My approach can work with a sql table too. So in place of an inline load query you can do the basic select... from db.tablename. The sql statement for resident load can be kept as is.

-nn