Bug 103105 - Feature Request: Please implement a unique() function to return unique values from a range
Summary: Feature Request: Please implement a unique() function to return unique values...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-11 06:34 UTC by Parijatha Kumar
Modified: 2017-06-28 12:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Parijatha Kumar 2016-10-11 06:34:29 UTC
Description:
Please implement a 'unique()' function which will give unique values from a range.

Steps to Reproduce:
Not applicable

Actual Results:  
Not applicable

Expected Results:
unique(Sheet1!A2:A50) should give unique values from the range Sheet1!A2:A50.


Reproducible: Always

User Profile Reset: No

Additional Info:
At the moment, there is no straight forward function to get unique values from a range. Given that awareness about understanding, manipulating and analysing 'data' is spread exponentially in the last few years, basic and trivial database fucntinality in Calc is of utmost importance and a very basic and common requirement for both SOHO and Enterprise users. 


User-Agent: Mozilla/5.0 (Linux; rv:42.0) Gecko/20100101 Firefox/42.0
Comment 1 brucehohl 2016-10-12 01:04:58 UTC
> At the moment, there is no straight forward function to get unique values 
> from a range.

You can use: 
Data > More Filters > Standard Filter
Select Field name (Column x), Conditions (=), Value (Not Empty)
Select additional filter criteria if desired ...
Click 'Options'
Check 'No duplications'

With 'Copy results to' the results can be written to another range anywhere within the workbook.
Comment 2 Buovjaga 2016-10-24 12:36:20 UTC
Parijatha: are you happy with the solution in comment 1?
Comment 3 Parijatha Kumar 2016-10-25 06:49:43 UTC
I am aware that such a (In reply to brucehohl from comment #1)
> > At the moment, there is no straight forward function to get unique values 
> > from a range.
> 
> You can use: 
> Data > More Filters > Standard Filter
> Select Field name (Column x), Conditions (=), Value (Not Empty)
> Select additional filter criteria if desired ...
> Click 'Options'
> Check 'No duplications'
> 
> With 'Copy results to' the results can be written to another range anywhere
> within the workbook.

I am aware of this 'work around'. It does not work for some use cases as below ...

1) What if I've to get unique combinations of cells in two adjacent columns and one of the cells can contain blank values ?
2) What if I've to apply some more functions like countif etc on the resulting unique values and display the overall result elsewhere in the document ? Ex. may be others can add rows in one sheet and the count of unique combinations in columns A and B is to be displayed in another sheet ?

What I am requesting is for a straight forward function something like unique() which can take an array (can be multideminesional array i.e., more than one column).
Comment 4 Parijatha Kumar 2016-10-25 06:52:00 UTC
(In reply to Buovjaga from comment #2)
> Parijatha: are you happy with the solution in comment 1?

No, I've given my reply. Please check.
Comment 5 Eike Rathke 2016-11-01 11:36:01 UTC
(In reply to Parijatha Kumar from comment #3)
> 1) What if I've to get unique combinations of cells in two adjacent columns
> and one of the cells can contain blank values ?
You set up a helper column that concatenates the adjacent cells. A UNIQUE function will not help there. Or I misunderstood.

> 2) What if I've to apply some more functions like countif etc on the
> resulting unique values and display the overall result elsewhere in the
> document ? Ex. may be others can add rows in one sheet and the count of
> unique combinations in columns A and B is to be displayed in another sheet ?
How is that in any way related to a UNIQUE function?

> What I am requesting is for a straight forward function something like
> unique() which can take an array (can be multideminesional array i.e., more
> than one column).
Note that to work correctly a UNIQUE function would have to output an array of rows. After being entered the first time the output array size would be fixed to the then number of unique values. If data was added to the original range, the range the UNIQUE function occupies / outputs to would *not* be extended, so would be pretty much useless then and would have to be re-entered, deleting the original range first. The situation is not much different from the filter-unique-to functionality, on the opposite, it would be even more cumbersome.
Comment 6 Buovjaga 2016-11-11 20:41:41 UTC
Parijatha: we are waiting for your replies.
Comment 7 QA Administrators 2017-05-31 10:51:24 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2017-06-28 12:34:32 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20170628