Returns value when all non-empty group elements are equal. Empty groups return
the default value for the data type (or a custom default).
Example
table T = with
[| as Item, as Group |]
[| 1, "a" |]
[| 1, "a" |]
[| 2, "b" |]
table G[g] = with
[| as g |]
[| "a" |]
[| "b" |]
[| "c" |]
G.Value = same(T.Item) by T.Group at G.g default -1
show table "Same" with
g
G.Value
This outputs the following table:
g
Value
a
1
b
2
c
-1
Errors
Fails when the group is non-empty and contains distinct values.