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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Converting rows to col...
Power Apps
Answered

Converting rows to columns

(0) ShareShare
ReportReport
Posted on by 43

Hello everyone, 

 

I have a collection which looks as follows:

 

Name1
Quantity1
Code1
Group1
Supplier1
Date1
Comment1
Name2
Quantity2
Code2
Group2
Supplier2
Date2
Comment2
....

 

After every 7th row, the pattern repeats and another row should be created in the table I need, as such:

 

NameQuantityCodeGroupSupplierDateComment
Name1Quantity1Code1Group1Supplier1Date1Comment1
Name2Quantity2Code2Group2Supplier2Date2Comment2

 

Unfortunately, there is no Transpose function available. Can anyone help me achieve this?

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @PA-JvdP ,

     

    I assume there is a collection:

    ClearCollect(NewCollection,["Name1","Quantity1","Code1","Group1","Supplier1","Date1","Comment1","Name2","Quantity2","Code2","Group2","Supplier2","Date2","Comment2"])

    The formula:

    ForAll(
     Sequence(CountRows(NewCollection)/7,0,1),
     {
     Name:Index(NewCollection,Value*7+1).Value,
     Quantity:Index(NewCollection,Value*7+2).Value,
     Code:Index(NewCollection,Value*7+3).Value,
     Group:Index(NewCollection,Value*7+4).Value,
     Supplier:Index(NewCollection,Value*7+5).Value,
     Date:Index(NewCollection,Value*7+6).Value,
     Comment:Index(NewCollection,Value*7+7).Value 
     }
    )

    vbofengmsft_0-1677030752467.png

    Best Regards,

    Bof

     

  • PA-JvdP Profile Picture
    43 on at

    This worked perfectly, thank you!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard