13.2 Convert row-based table to crosstab

 

The following data table records the daily sales of products:

imagepng

Now we want to create a crosstab, with the SaleDate as the left header of crosstab, the Products as the upper headers of crosstab, like this:

imagepng

Script:

=spl("=E(?1).pivot(SaleDate;Product,Amount)",Sheet1!A1:C16)

Perform the row-to-column conversion based on SaleDate column, the values in the Product column are transferred and used as the new column names, and the values in the Amount column are transferred and used as the values in new columns.


https://c.scudata.com/article/1651916536524
https://c.scudata.com/article/1657845240148
https://c.scudata.com/article/1658065251244