Forum Discussion
invoke power query from DAX
I have power query M code that generates the table from JSON input, I am able to load to the DAX using close and apply but I need a way to programatically load the result set from power query to DAX.
Not sure where to start or how to start.
Any help is appretiated.
Siva
2 Replies
- edhansCommunity Champion
This is what Scheduled Refresh does in the service, or the Refresh button in the Power BI Desktop app does. You cannot use DAX to trigger a refresh.
If you want to manually trigger it you could add an Power Platform app visual that will use a Power Automate flow to trigger the refresh, and coming soon is a Power Automate visual for Power BI (soon as in, the tools exist in Power Automate already, but not yet in Power BI, so real soon) that I hope will let you trigger a refresh with a simple button click.
But DAX is just a set of functions for analysis, not for making programming calls.
- v-yingjlCommunity Support
Hi siva_powerbi ,
You should know that DAX and power query are different.
Please refer this article which introduces it in details: M or DAX? That is the Question!
In essence, Power Query (M) is used to query data sources, clean and load data, DAX is used to analyze data in power bi.
Power query could affect the underlying data, but DAX could not.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.