web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Transpose rows to colu...
Power Apps
Unanswered

Transpose rows to columns in PowerApps

(0) ShareShare
ReportReport
Posted on 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:
I have the same question (0)
  • P_SA Profile Picture
    220 on at

    @RandyHayes  Can you help here please.?

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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 at

    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

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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 at

    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,297 Super User 2024 Season 1 on at

    @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 at

    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,297 Super User 2024 Season 1 on at

    @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 at

    Thank you @RandyHayes .. this worked.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard