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 Apps
Answered

Group

(0) ShareShare
ReportReport
Posted on by Super User 2024 Season 1

Hi Everyone,

I would to group share point list and my column are as follows and would like to include all in my grouping if possible please ; 

 

Check Number

Single line of text

Item

Company

Lookup

Item

InvoiceNumber

Single line of text

Item

OrderDate

Date and Time

Item

ShippingFee

Currency

Item

CodAmount

Currency

Item

TrackinNumber

Single line of text

Item

Status

Choice

Item

   

Thank you 

Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Ramole ,

    Do you want to group all columns in your SP List within an canvas app?

     

    Based on the columns screenshot that you mentioned, I think there is no direct way to achieve your needs. The GroupBy function could only be used to group simple type column, e.g. Text type, Date type, ...  rather than Complex type column, e.g. LookUp type, Person type, Choice type, ...

     

    As an alternative solution, I think the combination of AddColumns and GroupBy function could achieve your needs. Please consider add a Gallery in your app, set the Items property to following:

    GroupBy(
     AddColumns('YourSPList', "CompanyValue", Company.Value, "StatusValue", Status.Value),
     "CheckNumber",
     "CompanyValue", // New added column from AddColumns function
     "InvoiceNumber",
     "OrderDate",
     "ShippingFee",
     "CodAmount",
     "TrackinNumber",
     "StatusValue", // New added column from AddColumns function
     "GroupData"
    )

    Then within the Gallery, you could reference the column value using the following formula:

    ThisItem.'Check Number'
    ThisItem.CompanyValue
    ThisItem.InvoiceNumber
    ThisItem.OrderDate

    ....

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @v-xida-msft ,

    i am getting error i dont know why please have look here is the screenshot Thanks groupby.png

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Ramole ,

    Could you please share more details about the error message within your app?

     

    I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

    2.JPG

     

    Please make sure you have typed above formula within the Items property of a Gallery properly. Please check if you have specified proper column names within your GroupBy function.

     

    Please consider see the details of the formula error using the "App Checker" option in your PowerApps Studio as below:

    3.JPG

     

    Best regards,

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @v-xida-msft ,

     

    Thanks i seen it was one of the field incorrect now showing up but is not grouping at all please see the screenshot 
    Thanks 

    not grouping.png

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @v-xida-msft ,

     

    at moment i have this already which groupes good but i am having problems with date to included within the group here is the code and screenshot, please have a look if you can tweak and add the date type in to it please Thanks.

    Search(AddColumns(
    GroupBy(
    AddColumns(
    'Shipments ',
    "CompanyText",
    Company.Value
    ),
    "CompanyText",
    "ShipmentsByCustomer"
    ),
    "OrderDatesFull",
    Sum(                                               // this one i am having problems as it shows as sum and                                                                 actually is date type 
    ShipmentsByCustomer,
    OrderDate
    )

    ,
    "CODFull",
    Sum(
    ShipmentsByCustomer,
    CodAmount
    ),
    "TotalShipmentFee",Sum(ShipmentsByCustomer, ShippingFee),
    "Company",

    Descending

    ),TextSearchBox1.Text,"CompanyText")

     

     

     

     

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Ramole ,

    Could you please share a bit more about your scenario?

    Do you want to include the Date within the Group?

     

    Please consider modify your formula as below (display the latest Order Date within your Gallery😞

    Search(
     AddColumns(
     GroupBy(
     AddColumns(
     'Shipments ',
     "CompanyText",
     Company.Value
     ),
     "CompanyText",
     "ShipmentsByCustomer"
     ),
     "OrderDatesFull",
     First(Sort(ShipmentsByCustomer, OrderDate, Descending)).OrderDate, // Modify formula here
     "CODFull",
     Sum(
     ShipmentsByCustomer,
     CodAmount
     ),
     "TotalShipmentFee",
     Sum(ShipmentsByCustomer, ShippingFee),
     "Company",
     Descending
     ),
     TextSearchBox1.Text,
     "CompanyText"
    )

     

    or display all Order Dates as string (separated with ';') within your Gallery:

    Search(
     AddColumns(
     GroupBy(
     AddColumns(
     'Shipments ',
     "CompanyText",
     Company.Value
     ),
     "CompanyText",
     "ShipmentsByCustomer"
     ),
     "OrderDatesFull",
     Concat(ShipmentsByCustomer, OrderDate & "; "), // Modify formula here
     "CODFull",
     Sum(
     ShipmentsByCustomer,
     CodAmount
     ),
     "TotalShipmentFee",
     Sum(ShipmentsByCustomer, ShippingFee),
     "Company",
     Descending
     ),
     TextSearchBox1.Text,
     "CompanyText"
    )

    Within your Gallery, you could display all Order Dates as string value using the following formula:

    ThisItem.OrderDatesFull

     

    If you want to display all Order dates separately within your Gallery, I think you could consider add a List Box control or nested Gallery within the Parent Gallery to display the all Order dates:

    Search(
     AddColumns(
     GroupBy(
     AddColumns(
     'Shipments ',
     "CompanyText",
     Company.Value
     ),
     "CompanyText",
     "ShipmentsByCustomer"
     ),
     "OrderDatesFull",
     ShipmentsByCustomer.OrderDate, // Modify formula here
     "CODFull",
     Sum(
     ShipmentsByCustomer,
     CodAmount
     ),
     "TotalShipmentFee",
     Sum(ShipmentsByCustomer, ShippingFee),
     "Company",
     Descending
     ),
     TextSearchBox1.Text,
     "CompanyText"
    )

    Set the Items property of the List Box or nested Gallery to following:

    ThisItem.OrderDatesFull

    within the nested Gallery or List Box, set the Text property of the Label to following:

    ThisItem.Value

     

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    hI @v-xida-msft ,

     

    My friend your the best of the best at-last you solve for me this i was struggling for long i have tried everything with my little knowledge of powerapps i have learned from you and other wonderful people in powerapp community Thanks for you help @v-xida-msft        

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard