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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
PriyaJha
Regular Visitor

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
Fabric July 2025 Monthly Update Carousel

Fabric Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.