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
saranrajk
Helper II
Helper II

why parameter definitions is not showing for shared dataset in power BI report server

Hi,

When I'm calling the  API for getting parameter definitions I'm getting an empty array,

http://ServerName//reports/api/v2.0/Datasets(dataset_id)/parameterDefinitions

 

{
  "@odata.context""http://servername/reports/api/v2.0/$metadata#ParameterDefinitions",
  "value": []
}
 
But I've set the parameters in the shared dataset
shared_dataset_parameter1.PNG

 

How to resolve it

Thanks in advance.

 

5 REPLIES 5
d_gosbell
Super User
Super User

I just tested this scenario on my local server and this api worked fine and returned the parameter defined on my dataset. This would suggest that maybe something went wrong with the deployment and the version on the server does not match the version in the designer.

 

When you go to http://[servername]/reports/api/v2.0/Datasets does it say that your dataset has parameters?

 

Yeah, I'm getting the list of the dataset, I'm getting a response as hasParameter : False, 

and I'm using SSDT 2017, SQL Server 2017 and Microsoft Power BI Report Server Version 15.0.1102.646.

 

 

 

 


@saranrajk wrote:

Yeah, I'm getting the list of the dataset, I'm getting a response as hasParameter : False, 

 


So that sounds like the version of the dataset on the server and in SSDT are not the same. Maybe try deleting the one off the server and re-deploying it from SSDT or deploying it into a new location on the server.

I have tried and it is working now but what is causes this version compatibility because again stuck with error and I have recreated a new dataset.

Also, help me with the following errors.

Following are screenshots of my parameter and query in the dataset

parameterparameterqueryquery

when I call the following API

http://<server name>//reports/api/v2.0/DataSets(datasetID)/Data

I'm getting data is not process error.

what makes this kind of error.

Thanks in advance

 

 

 

 


@saranrajk wrote:

I'm getting data is not process error.

what makes this kind of error.

 


The "query text" in a dataset needs to be just a single SELECT statement that returns a single rowset you cannot have mulitple statements in there with declare, set, begin, end etc. If you need complicated logic like that you need to create a stored procedure and then call that from your dataset.

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.