Bug 151205 - New Paste Special Operations: Maximum, Minimum
Summary: New Paste Special Operations: Maximum, Minimum
Status: RESOLVED WONTFIX
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: needsUXEval
Depends on:
Blocks: Paste-Special DoAsMacro
  Show dependency treegraph
 
Reported: 2022-09-27 17:17 UTC by Robert Lacroix
Modified: 2022-10-14 00:35 UTC (History)
4 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 Robert Lacroix 2022-09-27 17:17:43 UTC
Description:
Existing operations for paste special are: None, Add, Subtract, Multiply, Divide.
Add 2 more operations: Maximum, Minimum

These new operations would work just like the existing operations.

Steps to Reproduce:
1. Select a source range, Copy.
2. Select a destination range of the same dimensions, Paste Special...
3. Choose the new operation, click OK.

Actual Results:
Operation does not currently exist.

Expected Results:
The new operation applied cell-by-cell between the copied range and the pasted range.


Reproducible: Always


User Profile Reset: No



Additional Info:
Excel does not have this feature.
Comment 1 Rafael Lima 2022-09-27 20:00:08 UTC
I'm not so sure about that.

Currently we support the basic mathematical functions (Add, Subtract, Multiply, Divide). If we add others such as Maximum and Minimum, then why not also add others as Average, Round, Power and so on?
Comment 2 Roman Kuznetsov 2022-09-27 20:15:12 UTC
I don't see user case for it, is there a real example where it would be useful?
Comment 3 Heiko Tietze 2022-09-28 08:51:45 UTC
Min/Max would be to keep this value or use the source. Kind of =IF(A1>B1;A1;B1) but at the same target cell, eg B1.

Wonder as well if there is a general use case.
Comment 4 Robert Lacroix 2022-09-28 21:13:02 UTC
Basically there's no need do any arithmetic operations with Paste Special as it's always possible to contain those operations in another spreadsheet range which can be copied and recorded with Paste-Special Number. It's just a convenience, sometimes a really big convenience, and it reduces the number of spreadsheet cells.

Example use case:
Tracking a set of measurements where there is no need to keep the history of measurements, only the last value and the "best" value to date, where "best" value is typically a maximum or minimum.

One such measurement is the price of a stock option (before expiry date) which will expire worthless. Such an option will have a maximum price, and it is desirable to sell such an option as close as possible to that price. Thus it is necessary to keep track of the maximum price even if you don't keep the entire price history.

It's best to automate data captures, but manual sampling must occur where automation is not available such as when there is no API. In this case, every convenience is a bonus to the user.
Comment 5 Eyal Rozenberg 2022-10-10 20:12:35 UTC
I say go for it. There's a little room left on the dialog as is, so why not?

When somebody asks for more functions, we could consider reducing the number of explicit functions and adding a text box or button for function lookup etc.

Also, Robert, please have a look at my bug 151111 - your general sentiment of expanding functionality here may agree with its spirit.
Comment 6 Rafael Lima 2022-10-10 20:38:12 UTC
(In reply to Eyal Rozenberg from comment #5)
> I say go for it. There's a little room left on the dialog as is, so why not?
> 
> When somebody asks for more functions, we could consider reducing the number
> of explicit functions and adding a text box or button for function lookup
> etc.

If we decide to do something like this, we could replace the existing operations by a dropdown list with all the possible functions, including MIN and MAX.

Basically, all functions that have 2 arguments could be used.

I just wonder if this wouldn't get too messy UX-wise.
Comment 7 Cor Nouws 2022-10-12 11:41:35 UTC
(In reply to Robert Lacroix from comment #4)

> Example use case:
> Tracking a set of measurements where there is no need to keep the history of
> measurements, only the last value and the "best" value to date, where "best"
> value is typically a maximum or minimum.

In the cases with Add, Substract etc, the steps are:
- copy a value from a random place
- select a range with values
- paste special with the action.

How would you use Maximum or Minimum if added to the Paste Special options?

Thanks,
Cor
Comment 8 Robert Lacroix 2022-10-12 16:33:09 UTC
(In reply to Cor Nouws from comment #7)
> 
> In the cases with Add, Substract etc, the steps are:
> - copy a value from a random place
> - select a range with values
> - paste special with the action.
> 
> How would you use Maximum or Minimum if added to the Paste Special options?
> 
> Thanks,
> Cor

In exactly the same way. The operation between cells in the copied range (source) is performed with cells in the destination range. The dimensions of the source and destination ranges are the same, or the source range is a single cell and the destination has multiple cells.

In your example, the source range has only one cell. Each cell of the destination would receive the min or max (as selected) of that cell with the source cell. If you like, you can think of this like saturating a signal in an electrical circuit. The set of destination values (the signal) would be limited on the low side by the Maximum operation with a lower limit (source) cell, and on the high end by the Minimum operation with an upper limit (source) cell.
Comment 9 Cor Nouws 2022-10-12 18:55:58 UTC
(In reply to Robert Lacroix from comment #8)

> In exactly the same way. The operation between cells in the copied range
> (source) is performed with cells in the destination range. The dimensions of
> the source and destination ranges are the same, or the source range is a
> single cell and the destination has multiple cells.

So I copy a value, say 3.
Then select a range with 4 cells, values 4, 6, 8, 5
Paste > Special > Max.

Then?
Comment 10 Heiko Tietze 2022-10-13 08:10:58 UTC
We discussed the topic briefly in the design meeting.

What I understand is that you copy a range like A1:A5 and paste it onto the same range at B1:B5 with the expectation to either use the minimum or maximum of both. Use case is to find the minimum temperature or the highest value of a blood pressure.

The terms Min/Max are a bit misleading since it is an attribute of a distribution. You rather ask for Lower/Higher, which would be unclear in itself too.

Putting all comments together the concerns about too many operations predominate and the recommendation is to implement the feature via extension.

Although I'm closing the ticket as WF please feel free to reopen. As a open source project any volunteer is free to submit patches - and I guess it would be accepted despite the concerns from the UX POV.
Comment 11 Robert Lacroix 2022-10-14 00:21:03 UTC
(In reply to Cor Nouws from comment #9)
> (In reply to Robert Lacroix from comment #8)
> 
> > In exactly the same way. The operation between cells in the copied range
> > (source) is performed with cells in the destination range. The dimensions of
> > the source and destination ranges are the same, or the source range is a
> > single cell and the destination has multiple cells.
> 
> So I copy a value, say 3.
> Then select a range with 4 cells, values 4, 6, 8, 5
> Paste > Special > Max.
> 
> Then?
After the processing is done, there is no change to the destination range, they are all already more than 3. There's nothing special about this - you would get a "no change" result if the copied value is 0 and the operation is Paste > Special > Add.
Comment 12 Robert Lacroix 2022-10-14 00:35:19 UTC
(In reply to Heiko Tietze from comment #10)
> We discussed the topic briefly in the design meeting.
> 
> What I understand is that you copy a range like A1:A5 and paste it onto the
> same range at B1:B5 with the expectation to either use the minimum or
> maximum of both. Use case is to find the minimum temperature or the highest
> value of a blood pressure.
> 
> The terms Min/Max are a bit misleading since it is an attribute of a
> distribution. You rather ask for Lower/Higher, which would be unclear in
> itself too.
> 
> Putting all comments together the concerns about too many operations
> predominate and the recommendation is to implement the feature via extension.
> 
> Although I'm closing the ticket as WF please feel free to reopen. As a open
> source project any volunteer is free to submit patches - and I guess it
> would be accepted despite the concerns from the UX POV.
"Greater of/Lesser of" might work. But that's just English semantics. I can't imagine what it would be with other locale settings. It might be very clear in some other languages.

Semantics can be very challenging when context is missing. In Tagalog there are 2 different words for the English word "we": inclusive of the person being spoken to, or exclusive; it has clarity without context. If we can make things clear without regard to the language, then we have a good UX design.