Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
djwbaker
Frequent Visitor

TSQL power bi API in SSMS

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

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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

dm-p
Super User
Super User

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.