This function enables us to convert rows to columns, or columns to rows. There is often the need to carry out this task in Power Apps, and there is no simple workaround.
Specifically, it's impossible to use data shaping functions to transpose a collection without hard coding the column headings, which makes it extremely difficult to transpose data into an output that contains dynamic column names which correspond to input data values.
Therefore, my suggestion is to provide an implementation of the Excel TRANSPOSE function in Power Apps. The usage of this function would look something like this. Let's take the example of a collection called SalesByRegion.
We would call the Transpose function like so.
The return value from Transpose would be a table that looks like this.