Ask Your Question
0

How to sort results by duplicates

asked 2017-03-03 11:28:51 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

hello. I need some help. I don't know how to sort results by duplicates finder.

So, I have 2 columns. Column A has the files names. Column B has all the numbers also the duplicate ones.

So, I need to sort Column A and Column B, so I get on the beginning of cells only the duplicate.

How can I do that?

edit retag flag offensive close merge delete

Comments

Please update your Q and provide a simplified example of the input and output data, e.g. input: filename1, 45; filename2; 45 Output: ?

EasyTrieve gravatar imageEasyTrieve ( 2017-03-03 17:26:56 +0200 )edit

And: Better post under your user name.

Lupp gravatar imageLupp ( 2017-03-04 20:43:41 +0200 )edit

3 Answers

Sort by » oldest newest most voted
2

answered 2017-03-04 20:42:42 +0200

Lupp gravatar image

updated 2017-03-05 09:20:51 +0200

Is this what you want?

edit flag offensive delete link more

Comments

@Lupp: of course i would enable natural Sort to order Name in order:

Name2
Name4
Name8
Name10
…
karolus gravatar imagekarolus ( 2017-03-05 10:57:30 +0200 )edit

@karolus (and as an additional explanation to everybody):
I didn't include sorting by name or by any additional key, and I wouldn't expect for sure that actual names (not just chosen as examples) observe a syntax making 'natural sort' reasonably applicable.
I suggested a sort only by the multiplicity values in the helper column leaving the groups in stable order otherwise.

Lupp gravatar imageLupp ( 2017-03-05 11:08:53 +0200 )edit
0

answered 2017-03-04 19:09:31 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

ok, this is a print screen.

https://snag.gy/SKuEMR.jpg

See that the number 345 on B column is a duplicate, and correspond to a different name in Column A.

So, I want to sort somehow, in order to appear the duplicates at the beginning of Columns with the name correspond in A column.

edit flag offensive delete link more
0

answered 2017-03-05 00:48:40 +0200

EasyTrieve gravatar image

updated 2017-03-05 00:50:01 +0200

If you move the data into Base, you can create a query to give you what you want.

  • Move the data into a base table

  • Prefix a unique key (ID) column (similar to your row number in Calc):

1 Name X 123
2 Name D 234
3 Name P 345
etc.

  • Create a query on Col B (your numbers) with the Count function as a generated column, this produces:

123 1
234 1
345 2
411 1
531 1

  • Now join this new query to your table in a 2nd query to produce the following:

1 Name X 123 1
2 Name D 234 1
3 Name P 345 2
etc.

Now you can sort by the 5th field first.

edit flag offensive delete link more

Comments

Why do you suggest the database-do in this case? It was very simple in Calc. And assuming the table is placed in a Writer document, using a spreadsheet as a helpers should be much simpler, imo.

Lupp gravatar imageLupp ( 2017-03-05 09:19:42 +0200 )edit

:-P I'm not as good at Calc. btw, what is sorrt by: M_ITY? I searched all over for M_ITY but ??

EasyTrieve gravatar imageEasyTrieve ( 2017-03-05 10:14:39 +0200 )edit

M_ITY was chosen as an arbitrary abbreviation for "multiplicity" which was the property the OQ wanted the items to get sorted by. The values for this key are generated in a helper column with this label in the first row. Column labels are without any effect concerning the functionality.

Lupp gravatar imageLupp ( 2017-03-05 11:12:50 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-03-03 11:28:51 +0200

Seen: 418 times

Last updated: Mar 05 '17