Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
shiveshsingh
Master
Master

duplicate & Unique

I have two columns,

Name, Salary

a,1

b,3

a,2

a,4

b,6

d,7

From these, i want below output. Not like attached

Duplicate, Unique

a               d

b          

Labels (1)
5 Replies
antoniotiman
Master III
Master III

Hi,

see Attachment.

Regards,

Antonio

m_woolf
Master II
Master II

Try this:

effinty2112
Master
Master

Hi Shivesh,

=Concat(Distinct Aggr(if(Count(Name) > 1,Name),Name),', ')

returns

a, b

=Concat(Aggr(if(Count(Name) = 1,Name),Name),', ')

returns

d

Cheers

Andrew

shiveshsingh
Master
Master
Author

not able to open qvw file, can you show expression & dimension

antoniotiman
Master III
Master III

Script :

LOAD * Inline [
Name, Salary
a,1
b,3
a,2
a,4
b,6
d,7
]
;

Table (Pivot)

Dimension :  =Aggr(If(Count(Name) > 1,'Duplicate','Unique'),Name)

Expression :  Concat(DISTINCT Name,Chr(10))

and