Announcements
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.
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'))
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:
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Haque 557
Valantis 328
David_MA 264 Super User 2026 Season 1