Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Special holiday offer! You and a friend can attend FabCon with a BOGO code. Supplies are limited. Register now.

Reply
PriyaJha
Helper I
Helper I

How to write query to fetch count of an entity from Dataverse

Hi All,

 

I have a linked service connecting to Dataverse and i want to fetch count of table/entity from Dataverse.

 

How to write query to fetch only count of table from Dataverse.

 

image.jpg

1 ACCEPTED SOLUTION
NandanHegde
Super User
Super User

You can use the below query :

FetchXML structure:

 

<fetch aggregate='true'>
<entity name='<<tableName>>'>
<attribute name='<<primaryKeyAttribute>>' alias='count' aggregate='countcolumn' />
</entity>
</fetch>

 




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

View solution in original post

4 REPLIES 4
V-yubandi-msft
Community Support
Community Support

Hi @PriyaJha ,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution we provided for your issue worked for you  or let us know if you need any further assistance?

Your feedback is important to us, Looking forward to your response. 

 

Thank You.

V-yubandi-msft
Community Support
Community Support

Hi @PriyaJha ,

We noticed we haven't received a response from you yet, so we wanted to follow up and ensure the solution we provided addressed your issue. If you require any further assistance or have additional questions, please let us know.

Your feedback is valuable to us, and we look forward to hearing from you soon.

 

Thank You.

V-yubandi-msft
Community Support
Community Support

Hi @PriyaJha ,

 

Thank you for reaching out to the Microsoft Fabric Community.

The @NandanHegde , has shared an  solution that should address your query. Could you please confirm if it worked for you?

If you need any further clarification or additional details, feel free to let us know. We’re ready  to assist.

 

If your issue is resolved, please mark the response as the Accepted Solution to help others in the community easily find the answer.

 

Thank You.

NandanHegde
Super User
Super User

You can use the below query :

FetchXML structure:

 

<fetch aggregate='true'>
<entity name='<<tableName>>'>
<attribute name='<<primaryKeyAttribute>>' alias='count' aggregate='countcolumn' />
</entity>
</fetch>

 




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors