Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
To query Capacity Metrics, we can connect to the XMLA end point. If you had installed the ‘CapacityMetrics’ App in a specific workspace, please follow the documentation here to retrieve the workspace connection. It looks similar to the screen below:
Copy the connection and connect from the client tool. For demo purposes, I am using SQL Server Management Studio here. Below are the steps to connect:
In case the connection is not successful, please proceed with the troubleshooting as mentioned here. Once the connection is successful, we will see the data model as shown below:
We can directly query the data set / browse the data/ automate using PowerShell. To query the dataset directly, you can run a DAX query like below:
EVALUATE SUMMARIZE (EvictionMetrics, EvictionMetrics[capacityObjectId], EvictionMetrics[timestamp], EvictionMetrics[activeModelCount], EvictionMetrics[inactiveModelCount], EvictionMetrics[averageIdleTimeBeforeEviction])
You can browse the data by right clicking on the data model and click on browse.
To automate this using PowerShell, we can consider using the connection string as mentioned below:
Provider=MSOLAP; Data Source= powerbi://api.powerbi.com/v1.0/myorg/<WorkspaceName>; Initial Catalog=<Provide Dataset ID>; Update Isolation Level=2
Author: Chandrika Ravuri
Reviewer: Mounika Narayana Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.