Skip to main content

Notifications

Community site session details

Community site session details

Session Id : w8BJddA3e8QbCLQffoTIeN
Power Apps - Building Power Apps
Answered

Transpose rows to columns in PowerApps

Like (0) ShareShare
ReportReport
Posted on 19 Sep 2022 11:58:03 by 220

Hello, I want to transpose below data into rows so that I can insert this into a gallery..

P_SA_1-1663588601736.png

 

I want the data to be in this format.

P_SA_2-1663588666002.png

KIndly help

Categories:
  • P_SA Profile Picture
    220 on 20 Sep 2022 at 03:50:11
    Re: Transpose rows to columns in PowerApps

    Thank you @RandyHayes .. this worked.

     

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 19 Sep 2022 at 20:00:25
    Re: Transpose rows to columns in PowerApps

    @P_SA 

    Yes, but like I said...WIP is a table!  That is why you are seeing what you are seeing.

    You need to specify a record.  Your First(colClientDetails).WIP is going to return a table (the WIP table).

    If you are only concerned about the first record of that, then you need to specify:  First(First(colClientDetails).WIP)

     

  • P_SA Profile Picture
    220 on 19 Sep 2022 at 16:01:22
    Re: Transpose rows to columns in PowerApps

    colClientDetails is a collection which holds client information. it has Parent child relationship.. Example one client can have multiple WIP values..  In the colClientDetails collection WIP is a table. that is why I have used first to fetch the records only for WIP using this  First(colClientDetails.WIP).WIP. 

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 19 Sep 2022 at 15:35:32
    Re: Transpose rows to columns in PowerApps

    @P_SA 

    That is because you are specifying a table as your source and not a record.

     

    What is colClientDetails? And you only want the first record from it??

  • P_SA Profile Picture
    220 on 19 Sep 2022 at 15:32:35
    Re: Transpose rows to columns in PowerApps

    Yes I have switched it and now I get two columns out of which  one is a table. Is this correct and how do I display the value column in the gallery using below data

    P_SA_0-1663601532028.png

     

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 19 Sep 2022 at 15:25:37
    Re: Transpose rows to columns in PowerApps

    @P_SA 

    Yes, you will get those results with that formula!  You have it backward from what I sent.

    You have the Name and Value switched.  Please review the formula I provided for more detail.

  • P_SA Profile Picture
    220 on 19 Sep 2022 at 15:10:34
    Re: Transpose rows to columns in PowerApps

    HI @RandyHayes , thank you for the answer, I have applied your formula. but this is how I get the result. 

     

    P_SA_0-1663600144172.png

     

    the data is not proper still

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 19 Sep 2022 at 14:32:40
    Re: Transpose rows to columns in PowerApps

    @P_SA 

    It will all be manual!!  There is no function to do what you need.

     

    To do this manually, you will be creating a table of the initial record column values.  They will all need to be the same data type.  You cannot mix text and numeric in the formula.  Either it is all text or all numeric.

     

    The following formula would convert the record you have shown into a table with a Name and Value column for each row.

    With({_rec: yourRecordhere},
     Ungroup(
     Table({Name: "amount", Value: Text(_rec.amount)},
     {Name: "amountGBP", Value: Text(_rec.amountGBP)},
     ...etc...
     ),
     "Name"
     )
    )

     

    I hope this is helpful for you.

  • P_SA Profile Picture
    220 on 19 Sep 2022 at 11:58:54
    Re: Transpose rows to columns in PowerApps

    @RandyHayes  Can you help here please.?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 32

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 24 Super User 2025 Season 1

#3
WarrenBelz Profile Picture

WarrenBelz 18 Most Valuable Professional

Overall leaderboard