Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi everyone!
Is it possible to execute a parametric SQL query on a data source to retrieve data filtered based on the values of a column, measure, or some specific values?
For example, I have a hierarchical dataset and I want to retreive the child nodes of the selected nodes (like this DAX code: Filter(mydataset, mydataset[ParentId]= {set of selected IDs})
I tried to use DAX functions (e.g., Filter and CalculateTable) to achieve my goal, but I couldn’t, since they have some limitations comparing to the SQL queries.
So, I want to execute the SQL query dynamically (in the runtime), or after clicking on a button, to save the result as a new table.
Thank you in advance for your suggestions!
I want to execute the SQL query dynamically (in the runtime), or after clicking on a button, to save the result as a new table.
You cannot dynamically create new materialized tables.
Best you can do is Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
Dear @lbendlin ,
Thanks for your information.
It is sad, because DAX and Power query have some limitations, or maybe I need to learn more about them.
Farhad
Power BI is not designed for what you want to accomplish. It has no memory, no mutable variables and has no concept of data write-back. What you are looking for is something that supports the full information cycle. Maybe that is something you would have to develop yourself.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |