cancel
Showing results for 
Search instead for 
Did you mean: 

Provide a function to transpose/convert rows to columns, or columns to rows

Microsoft Excel provides a function called TRANSPOSE. The documentation for this function is here:

https://support.microsoft.com/en-us/office/transpose-function-ed039415-ed8a-4a81-93e9-4b6dfac76027

 

timl_0-1632308392412.png

 

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.

timl_1-1632308540483.png

We would call the Transpose function like so.

Transpose(SalesByRegion)

 

The return value from Transpose would be a table that looks like this.

timl_2-1632308806550.png

 

 

Status: New
Comments
Cam
Kudo Collector
Kudo Collector

i came here from your blog 🙂

http://powerappsguide.com/blog/post/transpose-convert-rows-to-columns

 

i'm am trying to do the below:

I have 4x screens.

with an Edit form on screen 1 - 3

and then on screen 4 i'm trying to show a summary of the form updates performed on screen 1 - 3.

 

my idea was to collect the form.updates data from screen 1 - 3, 

then transpose the data and show it in a gallery on screen 4.

 

unfortunetly a transpose function doesnt exist in Power Apps yet 😞

please add a transpose function 🙂

MichaelFaust
Regular Visitor

This would be amazing with the Split function. Take a string, split it up into a single column table, then transpose the table so that the former row index becomes the column headers.