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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
arpost
Advocate V
Advocate V

Is there a way to run queries on all datasets in a workspace via XMLA/SSMS?

Does anyone know how to get run MDX on all datasets in a workspace via SSMS? I've successfully connected to the XMLA endpoint via SSMS (per MS doc). I can then run queries like this just fine when I connect to a specific dataset/database in the workspace:

 

SELECT * FROM $System.TMSCHEMA_PARTITIONS

 

However, I can't figure out how to run this at a "global" level for all datasets/tables at once without having to explicitly connect to EACH dataset first. Hoping someone else has a brilliant idea on how to solve for this.

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @arpost ,

 

Please refer from this solved post with similar issue like yours.

 

Assuming you can use the new-ish AAD based Power BI REST API custom connector you can do all this now in Power Query.

 

GitHub - migueesc123/PowerBIRESTAPI: A Microsoft Power BI Data Connector or Power Query Connector fo...

 

- collect all workspaces you have access to

- collect all datasets in these workspaces

- run MDX query against the datasets  (via the Analysis Services connector)

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I appreciate it, @v-rzhou-msft. I try to avoid 3rd-party solutions where possible for data security.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.