cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ivanho
New Member

GroupBy Day from Date time Field and Sum

Hi,  I am new to building powerapps.  Any help would be appreciated.   

Basically I just need to sum the dollarAmount from a sharepoint list by date.  However, the date (created)  field in sharepoint list has time as well.  I can't figure it out. 

 

AddColumns(
    GroupBy(
        'MySharePointList',
        "Created",
        "GroupedValue"
    ),
    "Total Sales",
    Sum(
        GroupedValue,
        DollarAmount
    )
)

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @ivanho ,

Created is a date and time - try this

AddColumns(
    GroupBy(
        AddColumns(
            MySharePointList,
            "CreateDate",
            Text(
                'Created',
                ShortDate
            )
        ),
        "CreateDate",
        "GroupedValue"
    ),
    "Total Sales",
    Sum(
        GroupedValue,
        DollarAmount
    )
)

 

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.

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @ivanho ,

Created is a date and time - try this

AddColumns(
    GroupBy(
        AddColumns(
            MySharePointList,
            "CreateDate",
            Text(
                'Created',
                ShortDate
            )
        ),
        "CreateDate",
        "GroupedValue"
    ),
    "Total Sales",
    Sum(
        GroupedValue,
        DollarAmount
    )
)

 

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.

ivanho
New Member

Thank you.  It works.

Helpful resources

Announcements
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 (3,265)