cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Group SharePoint list data in a collection.

I have SharePoint list in which I have the information of different products. In the list I have multiple records of same product with different serial number.
Product    SerialNumber    Availability

A              SA-001               true

A              SA-002               true

A              SA-003               true

B              ZA-001               true

B              ZA-002               false

B              ZA-003               true

 

Now in the powerapps I want to create a collection as the data source of gallery and the data of SharePoint list should be formatted as.

Product    QuantityOnHand  

A              3

B              2               

 

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Super User
Super User

Hi @Anonymous ,

Use this formula on your gallery items property:

AddColumns(

                 GroupBy( 

                            Filter(

                                     YourList, Availability="true"),

                            "Product",

                            "Result"),

                 "QuantityOnHand",

                 CountRows(Result)

 )

Hope it helps !

View solution in original post

2 REPLIES 2
gabibalaban
Super User
Super User

Hi @Anonymous ,

Use this formula on your gallery items property:

AddColumns(

                 GroupBy( 

                            Filter(

                                     YourList, Availability="true"),

                            "Product",

                            "Result"),

                 "QuantityOnHand",

                 CountRows(Result)

 )

Hope it helps !

View solution in original post

Anonymous
Not applicable

Perfect! this is what I was looking for.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,777)