13.2 Convert row-based table to crosstab
The following data table records the daily sales of products:
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:
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.
esProc Desktop and Excel Processing
13.1 Row-to-column conversion for fixed columns
13.3 Convert crosstab to row-based table
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/