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 Platform Community / Forums / Power Apps / Get the count of rows ...
Power Apps
Answered

Get the count of rows and sum per month

(1) ShareShare
ReportReport
Posted on by 20
Objective: Get the count of rows and Sum of Net Payables per month.
 
Sample Data:
Net Payables Date Created
       14,523.00 1-Dec-24
       34,253.00 2-Dec-24
       23,562.00 1-Jan-25
     135,664.00 3-Jan-25
  1,234,566.00 5-Jan-25
 
Code so far:
ClearCollect(TempTransCol,'Temp Transaction');
ClearCollect(
    ColGroupedData,
    AddColumns(
        GroupBy(
            TempTransCol,
            Text('Date Created', "mm-yyyy"),
            GroupItem
        ),
        TotalCount,
        CountRows(GroupItem),
        SumNet,
        Sum(GroupItems,'Net Payable')
    )
);
 
Error Received: Name isn't valid. 'Date Created' isn't recognized.
 
Categories:
I have the same question (0)
  • Verified answer
    Mitanshu Profile Picture
    1,658 Moderator on at
    Can you try the code below:
     
    ClearCollect(TempTransCol, 'Temp Transaction');
    ClearCollect(
        ColGroupedData,
        AddColumns(
            GroupBy(
                TempTransCol,
                Text('Date Created', "mm-yyyy"),
                "GroupItem"
            ),
            "TotalCount",
            CountRows(GroupItem),
            "SumNet",
            Sum(GroupItem, 'Net Payables')
        )
    );
     
    The group name inside GroupBy should be enclosed in quotes, as it's used as a field name in AddColumns.
  • WarrenBelz Profile Picture
    155,752 Most Valuable Professional on at
    Hi @atzdgreat​​​​​​​
    What is your data source type and is 'Date Created' a field you added (if using SharePoint, the field name is Created )? Also what is the data type of this field ? Note you do not need quotes around the field names as per the other response.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard