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 / GroupBy on Custom CDS ...
Power Apps
Unanswered

GroupBy on Custom CDS Entities

(0) ShareShare
ReportReport
Posted on by

Hello Community,

I have a general question related to using GroupBy on Custom CDS Entities. Are there any limitations or other specifics related for GroupBy function?

This is a start-up question as I can't get it right with this funcion and CDS Custom Entity I use in App (even with "copy-paste" published examples). Just want to know if I should look for the wrong doing on my side or shall I forget about GroupBy for now or should I take some ajusted steps to avoid limitations?! 

 

Maybe someone can share a usful link for me?

 

Tnxs

br

@RMC-Pro

Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @RMC-Pro :

    Could you describe these details in detail? If so, maybe I can help you find the problem.

    • How is your Custom CDS Entities set up? What does the data structure look like? (Field name, data type)
    • What is your formula?What is the error?

    Best Regards,

    Bof

  • RMC-Pro Profile Picture
    on at

    Hello v-bofeng-msft,

    thanks for replying, and sorry for the delayed answer. I am still checking and refining; have discovered some of my mistakes in forming a formula, ... . I am a bit further.

    Could there be a Delegation problem with GroupBy function? Currently when I form a collection I get only 2000 recs in; that's a number I have under Advance settings (and I know there should be more recs). On the other hand I do not get any Delegation warning?

     

    Additionally. If I put 

    GroupBy(
     Filter(
     'Activities Days Records',
     'Entry Belongs To' = vG_User.'User ID',
     ),
     "cr1db_dateinfocusfilterfield",
     "Rest"
    )

    into a table or collection I get 2.000 recs in.

    And if I put the same segment under CountRows(*), I get result 1 (only one rec).

    CountRows(GroupBy(
     Filter(
     'Activities Days Records',
     'Entry Belongs To' = vG_User.'User ID',
     ),
     "cr1db_dateinfocusfilterfield",
     "Rest"
    )

     

    And finally, maybe I should put that at the top :), I have a CDS Custom Entity, each day has more records, which I want to SumUp (e.g., RecordValue) and then count in how many Days the Sum is >0 and in how many Days the Sum is <0.
    <= with this I think I already answered myself

     

    But still I would like to have a view into "Rest" inside App. How to do that (If Delegation is not a problem with GroupBy)?

     

    Sorry I know it is a lot but can't gather it otherwise.

     

    Any suggestion, right approach or any hint to my wrongdoing will be much appreciated.

     

    (as you can see, more or less I am a novice)

    tnxs

    br

    @RMC-Pro

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @RMC-Pro :

    GroupBy is not a delegable function for the CDS for apps.I think this pictrue will help you a lot:

    1.JPG

    To bypass the delegation problem is more troublesome, maybe you can refer to this post:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Group-By-Month-and-count-the-number-of-items-per-month/td-p/625117

    Best Regards,

    Bof

     

  • RMC-Pro Profile Picture
    on at

    Hello @

     

     

    PostgreSQ

     

     

     

    With that I will close the thread and mark your answer as a solution.

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard