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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Yonas
Microsoft Employee
Microsoft Employee

Run a query against a dataset action in power automate error- should return data in JSON format

Hi, I'm trying to Run a query against a dataset action in Power automate by copying a DAX query form a powerBI table visual, when I run it, it is failing & raising the below error- should return data in JSON format. The query runs perfectly & returns values in DAX query in Powerbi but I'm not sure why it is failing in Power automate & why I am asked to change it to JSON format since I saw many people/blogs How to Run a Query against a Dataset Using Power Automate? - Enjoy SharePoint showing it can be run perfectly without changing to JSON. Could you please help what am I missing?

 

Yonas_1-1750652517902.png

 

 

1 REPLY 1
v-agajavelly
Community Support
Community Support

Hey @Yonas 

Thanks for sharing all the details, you're on the right track, as per my experiance especially when the DAX runs fine in Power BI but hits a wall in Power Automate. This happens often when the DAX query doesn’t return a proper JSON-formatted table that Power Automate expects. Even if it works in Power BI, Power Automate needs it in a clean tabular format (like using SELECTCOLUMNS or SUMMARIZECOLUMNS inside an EVALUATE).
Try wrapping your measure in something like this by bellow way.

EVALUATE
SELECTCOLUMNS({ [Your Measure] }, "Result", [Value])

Or better, structure your query to return rows and columns, that usually fixes the JSON issue.

_________________________________________________________________________________________________________________________

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!


Regards,
Akhil.



Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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