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
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 ACCEPTED SOLUTION
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.



View solution in original post

4 REPLIES 4
v-agajavelly
Community Support
Community Support

Hi @Yonas ,

Since we haven’t heard back from you, we’ll proceed to close this thread for now. If you continue to experience issues or have any additional questions, feel free to start a new thread in the Microsoft Fabric Community Forum. We’re always here to help and happy to support you.

Regards,
Akhil.

v-agajavelly
Community Support
Community Support

Hi @Yonas ,

I’m following up to confirm that all items discussed have been addressed. If there’s anything else you need, I’d be happy to assist. Please feel free to reach out Microsoft fabric community forum.

Regards,
Akhil,

v-agajavelly
Community Support
Community Support

Hi @Yonas ,

Just circling back were you able to get the Power Automate flow working after adjusting the DAX structure? That SELECTCOLUMNS trick usually does the job, but if it’s still giving you trouble or returning unexpected output, feel free to share the query you're using. Happy to take a look and help on it.

Thanks,
Akhil.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI 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.

Top Solution Authors