Forum Discussion
Trigger an M Query on a button click on Power BI
this is my M query and it's doing what is expected however want to parameterise the body and trigger it on a button click. Need help to understand how to achieve the same?
- Anonymous2 years agoNot applicable
Hi roysampad91
Currently the native button in a Power BI report cannot trigger a Power Query M query. Because PowerQuery is used for data ETL, and the buttons in the report are added when making the report. Reporting happens after the data ETL, so there is no way to use a button to trigger an action that should happen before.
May I know why you want to trigger it on a button click? Do you hope that report users can use the button to trigger the query? If so, this is not supported for the reason above.
You may explore Power Automate to create a flow to trigger a POST request but you have to store the data received to somewhere else out of Power BI. The data received cannot be loaded into the same PBI report where the trigger-flow button is.
Hope these explanations help.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!