Duplicates and gaps are explicit
The example turns survey answers into one row per respondent and one column per question. Respondent r3 answered Q3 twice. With “Mean” the two answers become 4.5, and the step reports one cell with more than one value. “Keep first” would be reported as a loss.
r3 skipped Q2 entirely, so that cell is absent; r2 answered Q2 with an empty value, which is different. Absent cells are filled as missing, empty text or 0, according to your choice.
Unpivot is the reverse: pick identifier columns and the columns to turn into name/value rows. Pivoting an unpivoted table with “Keep first” reproduces the original exactly, which the test suite checks.
Questions
What if a column has thousands of distinct values?
A preflight limit (500 columns by default) stops the pivot before it builds an unusable table. Filter first or raise the limit deliberately.
Are sums and means exact?
Yes. They use exact decimal arithmetic; means are rounded half-even to the number of places you choose.
How do I group without pivoting?
Use “Group & aggregate” for one row per group with count, sum, min, max, mean, distinct count or concatenation.