https://bugs.documentfoundation.org/show_bug.cgi?id=172762

            Bug ID: 172762
           Summary: Add new aggregate function: "uniform value or none"
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

When using pivot tables, we often want one of our "data fields" to display a
value that is the same for all aggregated records. This is doable, at least for
numeric values: One chooses the 'Average' function for the chosen data field -
and if all elements are identical, then the uniform value is shown. But
sometimes, due to a mistake in forming the PivotTable or a change in the data,
the aggregated values are _not_ all the same; and 'Average' will either display
some clearly-incorrect value, or worse, a value which may seem correct (e.g.
5,5,5,25 will yield an average of 10). Also, for non-numeric values - no
aggregation can be used except for counting (e.g. 'Min' and 'Max' don't work
for strings).

I suggest we add a new aggregate function. It's name will need some
"bikeshedding", but here's what it does:

* It works for any kind of values in the aggregated records, not just numbers.
* If all aggregated records have the same exact value - the function returns
that value.
* If any of the aggregated records' values differ (including by being empty) -
the resulting cell will be empty.

So, some ideas for the name:

* "Uniform"
* "Uniform Value or None"
* "Uniform Value or Empty"
* "Unique Value or Empty"
* "Uniform-or-Empty"
* "Unique-Value-or-Empty"
* "UniqueOrEmpty"

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to