Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

show duplicate records

Hi,

I have this straight table in QV, but I need it to show only the employees with duplicate emp num, in this case only both the rows of emp num 12, I tried using conditional enable but it doesn't work. please advise

Thanks

   

empnumnameemp numemp name
11john smith11john smith
12lynne12lynne
12sunny12sunny
22mike pepper22mike pepper
1 Solution

Accepted Solutions
sunny_talwar

I would use empnumname instead of emp name because emp name can repeat. and you missed a closing parenthesis at the end of count

=Sum({<empnumname={"=Count(empnumname)>1"}>} Value)

View solution in original post

16 Replies
vikasmahajan

Try this

= Sum(Aggr(If(Count(emp num)>1,1,0),empnumname,emp name))

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Kushal_Chawda

your straight table expression should look like below

= sum({<[emp name]={"=count([emp num]>1)"}>} Value)

sunny_talwar

I would use empnumname instead of emp name because emp name can repeat. and you missed a closing parenthesis at the end of count

=Sum({<empnumname={"=Count(empnumname)>1"}>} Value)

tamilarasu
Champion
Champion

Sunny,

Try like below,

=If(aggr(NODISTINCT count([emp num]),[emp num])>1,[emp name])

sunny_talwar

I didn't see that OPs name was Sunny too. I was like why me

tamilarasu
Champion
Champion

Anonymous
Not applicable
Author

Thanks guys, that helps, I was just wondering why can't we adopt a more simpler way like conditional enabling or calculation where count of emp num > 1

Kushal_Chawda

But why you need conditional enabling here?

Anonymous
Not applicable
Author

to show only duplicate records