Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis

Hi guys,

Could you please help me with the below expression, what it does?

num(

Count({<[ID SCD duplicate]={"=Count([ID SCD duplicate])>1"}>}[ID SCD duplicate])

,'# ##0')

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

It is counting the number of duplicate values your each field value of [ID SCD Duplicate] field has. So for ex:

From the below sample data:

File:

LOAD * INLINE [

File, ALL

C571, R

C571, NR

C569, R

C869, R

C869, NR

C869, NR

C1806, R

];

If you do count(File) you will get                                                                   : 7

If you do Count({< File = "=Count(File) >1"} >} File) you will get                  : 5

- So here it is counting only those values which has count >1.

If you do Count(DISTINCT {< File = "=Count(File) >1"} >} File) you will get : 2

- So here it counts the number of field unique field values that has duplicates. There are two values C571 and C869 which have duplicates.

Hope this makes sense.

View solution in original post

2 Replies
vishsaggi
Champion III
Champion III

It is counting the number of duplicate values your each field value of [ID SCD Duplicate] field has. So for ex:

From the below sample data:

File:

LOAD * INLINE [

File, ALL

C571, R

C571, NR

C569, R

C869, R

C869, NR

C869, NR

C1806, R

];

If you do count(File) you will get                                                                   : 7

If you do Count({< File = "=Count(File) >1"} >} File) you will get                  : 5

- So here it is counting only those values which has count >1.

If you do Count(DISTINCT {< File = "=Count(File) >1"} >} File) you will get : 2

- So here it counts the number of field unique field values that has duplicates. There are two values C571 and C869 which have duplicates.

Hope this makes sense.

Anonymous
Not applicable
Author

Thanks a lot for very crisp and clear explanation