Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have Field 1 and Field 2 in a Table.
Field 1, Field 2
Orange, O1
Orange, O2
Green, G1
Green, G2
Yellow, O1,
Purple, O1
Like above, i need to find which is field 2 is duplicated and how many times it is duplicated?
Expected Answer is O1 is duplicated and 3 times.
Thanks in advance
Perhaps this?
Count({<[Field 2]={"=Count([Field 2])>1"}>} [Field 2])
It did not work.
What is the exact output and where?
Hi there
Maybe not exactly what you want, but AGGR(Count([Field 2]),[Field 2]) will give you the number of times that Field 2 appears. If you use it with your Field 2 then you can easily manipulate it to only give you the values where it appears more than once.
Regards,
Mauritz
Hi,
could you do it inside the script?
TABLE:
LOAD * Inline [
Field 1, Field 2
Orange, O1
Orange, O2
Green, G1
Green, G2
Yellow, O1
Purple, O1
]
;
Left Join (TABLE)
LOAD *
If(Count_field_2>1,'duplicated','not duplicated) as flag
;
LOAD
[Field 2],
Count([Field 2]) as Count_field_2
Resident TABLE
Group By
[Field 2]
;