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 Automate / Count the number of ro...
Power Automate
Answered

Count the number of rows/records from a Power BI dataset

(0) ShareShare
ReportReport
Posted on by 19

I have a Power Automate workflow that runs a DAX query against a Power BI dataset. How can I count the number of records returned by the query and store this value as a variable to use for conditional logic in the rest of the workflow.

Categories:
  • Sundeep_Malik Profile Picture
    6,501 on at

    Hey @gmorissette 

    Just use length function ahead where ever you are getting the body of the above dataset.

    So for example, after getting the dataset you are saving it in a compose so just write:

    length(outputs('Compose'))

  • Verified answer
    gmorissette Profile Picture
    19 on at

    Thanks for the answer but your solution works for an array. A DAX query returns a table, which is an object. In the end, all you have to do it seems is wrap the object inside the length function like so:

     

    length(outputs('NameOfYourDAXQuery')?['body/firstTableRows'])

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 307 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 127

Last 30 days Overall leaderboard