Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi Has anyone been able to query Power bi datasets using TSQL in SSMS?
I can use MDX, DAx And XMLA. But i cant seem to activate the TSQL option, any ideas?
cheers Dan
Solved! Go to Solution.
Hi @djwbaker,
AFAIK, power bi rest API does not include t-SQL operate features.
Perhaps you can try to use SQL connector with an advanced t-sql statement and parametrize with query parameter then you can use rest api to modify them on the power bi service side.
Power Query SQL Server connector | Microsoft Docs
Using the Power BI Service Parameters to change connection strings (To possibly change between Dev
Datasets - Update Parameters - REST API (Power BI Power BI REST APIs) | Microsoft Docs
Regards,
Xiaoxin Sheng
Hi @djwbaker,
AFAIK, power bi rest API does not include t-SQL operate features.
Perhaps you can try to use SQL connector with an advanced t-sql statement and parametrize with query parameter then you can use rest api to modify them on the power bi service side.
Power Query SQL Server connector | Microsoft Docs
Using the Power BI Service Parameters to change connection strings (To possibly change between Dev
Datasets - Update Parameters - REST API (Power BI Power BI REST APIs) | Microsoft Docs
Regards,
Xiaoxin Sheng
Hi @djwbaker,
Power BI data models are not conventional SQL database tables, and rather Analysis Services (Tabular) models. As such, T-SQL is not a valid way to query them, whereas MDX/DAX/XMLA are all appropriate languages suitable for doing this. As such SSMS will not enable T-SQL here, but enable the others, as you're experiencing.
Regards,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |