Forum Discussion

saranrajk's avatar
saranrajk
Helper II
6 years ago

how to get aggregated data from Power BI report server using Rest API?

Hi,

I'm trying to get the aggregated result from POWER BI report server rest API by using the following url

http://{server}//reports/api/v2.0/Datasets(23617073-a6d9-45e8-8f2c-abc78bdfb267)/Model.GetAggregatedValue?ColumnName=ingredient_name&Aggregation=6

 

I can able to retrieve data from the datasets

 

The following are the parameters

ColumnNameThe name of the DataSet column to aggregate the value for.(I give dimension name here)

Aggregation The type of aggregation to use on the specified column. Values come from the KpiSharedDataItemAggregation enum.(for Aggregation they mentioned to use KpiSharedDataItemAggregation and I'm using 6 as value as per the documentation https://docs.microsoft.com/en-us/openspecs/sql_server_protocols/ms-rsrest/a7f68efc-4622-47be-949c-ed66ee8f57de  if this is right? where can I mention measure)

 

Parameters An array of DataSet parameters to use when executing the query.

Format for parameters 

{
   "Parameters": [
    {
       "Name": "string",
        "Value": "string"
    }
    ]
}(Hope this is used for filter if so, how can I give values)

 

 

1 Reply