admin管理员组文章数量:1134247
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(GroupItem,'Net Payable')
)
);
Error Received: Name isn't valid. 'Date Created' isn't recognized.
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(GroupItem,'Net Payable')
)
);
Error Received: Name isn't valid. 'Date Created' isn't recognized.
Share Improve this question edited Jan 8 at 1:49 user2328935 asked Jan 8 at 1:38 user2328935user2328935 252 silver badges9 bronze badges1 Answer
Reset to default 0In the GroupBy function you cannot use an arbitrary expression (such as Text('Date Created', "mm-yyyy")
) in the columns to be grouped. You can fix this by using the AddColumns function to create a new column with that value, like the expression below:
ClearCollect(
ColGroupedData,
AddColumns(
GroupBy(
AddColumns(TempTransCol, 'DateCreatedMonthYear', Text('Date Created', "mm-yyyy")),
DateCreatedMonthYear,
GroupItem
),
TotalCount,
CountRows(GroupItem),
SumNet,
Sum(GroupItem,'Net Payable')
)
)
That should give you the grouped collection you need.
本文标签: powerappsGet the count of rows and sum per monthStack Overflow
版权声明:本文标题:powerapps - Get the count of rows and sum per month - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736764294a1951728.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论