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

Group and Sum Sharepoint List

Hi everyone, 

 

I have a sharepoint list that I need to import into a datatable in powerapps and then group on the vendor name and sum only a select columns whilst ignoring all other columns. 

 

I've tried using add columns/remove columns in conjunction with group by but I can't seem to get it to work.

 

Any help would be appreciated!

 

Thank You!

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Super User
Super User

Hi @Anonymous 

 

Here is the Sample for the group by

 

 

 

DropColumns(
    AddColumns(
        GroupBy(
            AddColumns(
                'DataSource',
                "ColumnNameAlias",
                VendorName
            ),
            "ColumnNameAlias",
            "VendorGroup"
        ),
        "CountValue",
        CountRows(VendorGroup)
    ),
    "VendorGroup"
)

 

 

Change DataSource and VendorName column on this query.

 

And for Sum, you will be doing only for specific columns

 


Thanks,
Stalin - Learn To Illuminate

View solution in original post

2 REPLIES 2
StalinPonnusamy
Super User
Super User

Hi @Anonymous 

 

Here is the Sample for the group by

 

 

 

DropColumns(
    AddColumns(
        GroupBy(
            AddColumns(
                'DataSource',
                "ColumnNameAlias",
                VendorName
            ),
            "ColumnNameAlias",
            "VendorGroup"
        ),
        "CountValue",
        CountRows(VendorGroup)
    ),
    "VendorGroup"
)

 

 

Change DataSource and VendorName column on this query.

 

And for Sum, you will be doing only for specific columns

 


Thanks,
Stalin - Learn To Illuminate

Anonymous
Not applicable

So I have managed to get the formula working but the new column I want isn't showing in my datatable?

See screenshots of formula and resulting datatable

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,066)