Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
can I run a sql query against data imported into the semantic model in power bi desktop
Solved! Go to Solution.
Hi @djm7 ,
The short answer is no, you can't query model data using SQL within Power BI Desktop. PBI models use the tabular structure and are optimised for DAX and MDX queries.
However, depending on your use-case, you may be able leverage Datamarts, but you've not provided enough information to understand whether this is feasible/appropriate or not:
https://learn.microsoft.com/en-us/power-bi/transform-model/datamarts/datamarts-analyze
Pete
Proud to be a Datanaut!
No, you cannot run SQL queries directly on imported data in Power BI’s semantic model. Instead:
No, you cannot run SQL queries directly on imported data in Power BI’s semantic model. Instead:
Hi @djm7 ,
The short answer is no, you can't query model data using SQL within Power BI Desktop. PBI models use the tabular structure and are optimised for DAX and MDX queries.
However, depending on your use-case, you may be able leverage Datamarts, but you've not provided enough information to understand whether this is feasible/appropriate or not:
https://learn.microsoft.com/en-us/power-bi/transform-model/datamarts/datamarts-analyze
Pete
Proud to be a Datanaut!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.