Hi @Anonymous :
Because Groupby is not a delegable function, once the number of records exceeds 2000, then an error will definitely occur.
In addition,The date field is also not delegateable, you also need a separate field "month".
I have an alternative for your reference:
I assume you have added a number field "Month" into the SP list:
ForAll(
Table(
{themonth: 1},
{themonth: 2},
{themonth: 3},
{themonth: 4},
{themonth: 5},
{themonth: 6},
{themonth: 7},
{themonth: 8},
{themonth: 9},
{themonth: 10},
{themonth: 11},
{themonth: 12}
),
ForAll(
Table(
{therisk: "Risk1"},
{therisk: "Risk2"},
{therisk: "Risk3"}
),
Collect(
thecollection, /*thecollection is my custom collection*/
{
Month: themonth,
Risk: therisk,
group: Filter(
YourSPlist,
Month = themonth,
Risk=therisk
)
}
)
)
)
I created a table using hard coding, and then traversed the table to create a new collection
Best Regards,
Bof