Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

How to соunt entity records?

(0) ShareShare
ReportReport
Posted on by 264

Hi, guys!

There are more than 50 000 records in the entity. Is there a way to count them?

Xrm.WebApi.online and powerAutomate can process only 5000 records.

Categories:
  • Max77 Profile Picture
    264 on at
    Re: How to соunt entity records?

    @dpoggemann , I'm going to create an accounting application.
    It includes accounting for valuables in the warehouse,
    also accounting and control of leased equipment.

    A separate database will store all historical data on the arrival, consumption and movement of goods in the warehouse.

     

    For example table "Inventory stocks":
    field RecordType - expense or receipt
    fields "Warehouse", "item", "Date", "Recorder" - are analitic
    fields "Quantity", "Amount" - resources

    So I can evaluate item quantity at any point of time.
    I will use this table to check if quantity is enough to sell and of course the table will be used to build items movement report.

    + Warehouse1 Item1 "2023/06/05" "purchase 1"   3   90
    - Warehouse1 Item1 "2023/06/06" "moving 1"   2   60
    + Warehouse2 Item1 "2023/06/06" "moving 1"   2   60

    So I can see the balance on "2023/06/06" and later
    Warehouse1 Item1   1   30
    Warehouse2 Item1   2   60


    It's not a good way to use Dataverse for this data and it is very difficult and hard to use PA or JS + Xrm.WebApi.online to manipulate DB.

    So i'm going to use Stored SQL procedures and plugins.

     

  • Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: How to соunt entity records?

    HI @Max77 ,

     

    What are you specifically trying to do?  Is this.a reporting / analytics process? How is the new table going to be utilized within the business process / Power Apps application?  

  • Max77 Profile Picture
    264 on at
    Re: How to соunt entity records?

    @dpoggemann thank you very much! It works.

    One more question pls.

     

    I'm going to create a separate ms sql db to store additional data.

    As I understand it's impossible to make such a query

     

    Select ...   from [mydataverse].[dbo].[entity1]

         left join [myseparatedb].[dbo].[mytable]

            on ....

     

    Which way is better?

    1. Dublicate dataverse entities in my sql db (use powerautomate flow on dataverse entity update/insert), and then exec local query.

    2. Use dataverse vitrual tables placed in my separate sql server, then use local query.

     

     

  • Verified answer
    Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: How to соunt entity records?

    Hi @Max77 

    Are you trying to just count the records in the tables overall or are you trying to display a count somewhere?  The easiest way to look at the record counts on all the tables is to connect to them using SQL Server Management Services (SSMS).  https://learn.microsoft.com/en-us/power-apps/developer/data-platform/dataverse-sql-query 

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 15

#2
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

Overall leaderboard

Featured topics