This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hi,
I need to get the total no of rows present in a dataset table. Because I am usig a ExecuteQueries REST API to get the response from dataset tables. but in my case the response is too big, they contains so many no of rows, So I need to know how many total rows are there (inside a dataset table). then only i will set pagination for the response.
Please anyone help me to solve this issue.
Solved! Go to Solution.
Hi @_Stephen ,
There isn’t a direct Power BI REST API endpoint to get the total number of rows in a dataset table. However, you can use the endpoint to run a DAX query that counts the number of rows in a table ExecuteQueries.
Datasets - Execute Queries - REST API (Power BI Power BI REST APIs) | Microsoft Learn
{
"queries": [
{
"query": "EVALUATE ROW(\"RowCount\", COUNTROWS('YourTableName'))",
"queryId": "CountRowsQuery"
}
]
}
This DAX query will return a table with a single row and column that contains the count of rows in ‘YourTableName’. You can then parse this count from the API response.
Please note that the endpoint has a limit of 100,000 rows or 1,000,000 values per query (whichever is hit first)ExecuteQueries. If your table has more rows than this, the count will be capped at the limit.
Also, remember to replace ‘YourTableName’ with the actual name of your table.
If you’re dealing with large datasets and you’re hitting these limits, you might need to consider other strategies for managing your data, such as filtering or summarizing your data before querying it, or using pagination as you mentioned.
Best regards.
Community Support Team_Caitlyn
Hi @_Stephen ,
There isn’t a direct Power BI REST API endpoint to get the total number of rows in a dataset table. However, you can use the endpoint to run a DAX query that counts the number of rows in a table ExecuteQueries.
Datasets - Execute Queries - REST API (Power BI Power BI REST APIs) | Microsoft Learn
{
"queries": [
{
"query": "EVALUATE ROW(\"RowCount\", COUNTROWS('YourTableName'))",
"queryId": "CountRowsQuery"
}
]
}
This DAX query will return a table with a single row and column that contains the count of rows in ‘YourTableName’. You can then parse this count from the API response.
Please note that the endpoint has a limit of 100,000 rows or 1,000,000 values per query (whichever is hit first)ExecuteQueries. If your table has more rows than this, the count will be capped at the limit.
Also, remember to replace ‘YourTableName’ with the actual name of your table.
If you’re dealing with large datasets and you’re hitting these limits, you might need to consider other strategies for managing your data, such as filtering or summarizing your data before querying it, or using pagination as you mentioned.
Best regards.
Community Support Team_Caitlyn
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 14 | |
| 11 | |
| 9 | |
| 7 | |
| 6 |
| User | Count |
|---|---|
| 37 | |
| 32 | |
| 29 | |
| 23 | |
| 20 |