Forum Discussion

Brilliant's avatar
Brilliant
Regular Visitor
6 years ago
Solved

Retrieve Measures Using REST API

Hi everyone! I wanted to get all of the measures using the PowerBI REST API. I couldn't retrieve measures. I have only retrieved the datasets and data sources. But datasources have poor informat...
  • v-diye-msft's avatar
    v-diye-msft
    6 years ago

    Hi Brilliant 

     

    if you'd like retrieve all measures from one pbix file, you might try below methods:

    You can run a DMV query against the Tabular cube.

    Essentially you need to connect to your Power BI Desktop instance from a tool such AS Sql Server Management Studio (or MDX Studio) and issue the following Query

    SELECT [CATALOG_NAME] as [DATABASE],
    CUBE_NAME AS [CUBE],[MEASUREGROUP_NAME] AS [FOLDER],[MEASURE_CAPTION] AS [MEASURE],
    [MEASURE_IS_VISIBLE]
    FROM $SYSTEM.MDSCHEMA_MEASURES

    This will output information on your measures