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 / Combine multiple rows ...
Power Apps
Unanswered

Combine multiple rows in SharePoint list into a row

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I am wondering if anyone has a solution for this issue that I am facing.

I have a SharePoint list with multi rows with the same value in A, B, C column and different time value in a time range.

I want to combine multiple rows into a row, looks like below:

 

kinghnvn_0-1638084428381.png

Does anyone here know if there is a way to do this?

Thanks

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    HI @kinghnvn ,

    You need to use GroupBy

    GroupBy(
     YourListName,
     "Name",
     "StartDate",
     "EndDate",
     "StartTime",
     "EndTime",
     "Data"
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • kinghnvn Profile Picture
    on at

    @WarrenBelz 

     

    I'm sorry, sir. I still don't quite understand. Could you please explain detail steps?

    Thanks.

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    Hi @kinghnvn ,

    The code I posted would be the Items of a Gallery to produce what you have at the right. You do not need to display the last column, but is it needed for the syntax to work.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • kinghnvn Profile Picture
    on at

    thank you @WarrenBelz 

    It's still not working.

    kinghnvn_0-1638153894201.png

     

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @kinghnvn ,

    That is the correct syntax (there are no others) - can you please post the Items of the gallery in your example as it is should not be possible to produce that result with the code.

  • kinghnvn Profile Picture
    on at

    @WarrenBelz 

    Please find my code in the Items of the gallery below. Thanks.

     

    SortByColumns(
    Filter(
    'Desk Reservations',
    'Reserved By'.Email = currentUser.Email && 'Check Out From Number' >= Value(
    Text(
    Now(),
    "yyyymmddhhmm"
    )
    )
    ),
    "CheckOutFromNumber",
    Ascending
    )

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @kinghnvn ,

    That does not resemble what I posted - where did you put that code?

  • kinghnvn Profile Picture
    on at

    @WarrenBelz 

    I put the code in the Items of the gallery 

    kinghnvn_0-1638166057453.png

     

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @kinghnvn ,

    I meant the code I posted as the Items of the gallery

    GroupBy(
     YourListName,
     "Name",
     "StartDate",
     "EndDate",
     "StartTime",
     "EndTime",
     "Data"
    )

    you probably need something like this

    SortByColumns(
     AddColumns(
     GroupBy(
     Filter(
     'Desk Reservations',
     'Reserved By'.Email = currentUser.Email && 
     'Check Out From Number' >= Value(Text(Now(),"yyyymmddhhmm"))
     ),
     "Name",
     "StartDate",
     "EndDate",
     "StartTime",
     "EndTime",
     "Data"
     ),
     "SortNo",
     First(Data).'Check Out From Number'
     ),
     "SortNo",
     Ascending
    )

    but again I must ask (as per your previous post) why are you converting dates to numbers (this was necessary some time ago before dates were Delegable, so maybe you have an old template)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • kinghnvn Profile Picture
    on at

    Noted with thanks. I tried your group by code in gallery but it's still not working. I guess because I have many titles in gallery. Should I set a flow to edit value in SharePoint list? Please advise.

     

    kinghnvn_0-1638170865237.png

    kinghnvn_1-1638170875420.png

     

    kinghnvn_2-1638170946516.png

     

    kinghnvn_3-1638171010095.png

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard