Model parameters API

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Note

These release notes describe functionality that may not have been released yet. To see when this functionality is planned to release, please review Summary of what’s new. Delivery timelines and projected functionality may change or may not ship (see Microsoft policy).

Users can use model parameters to define parameters and make them a part of their reports and data models, such as a query filter, a data source reference, and a measure definition, dependent on one or more parameter values. Parameters are defined on the PBIX file through Power BI Desktop. For more information, see this blog post.

Developers can use our new API to dynamically change the values of the parameters and automate the process of working with them. The API includes a call to get all parameters defined on a specific dataset, and a call to set parameter values to set new values for existing parameters.

With this new API, you can automate many processes for multiple customers. A few examples are:

  • Change connection string. By configuring parameters on the connection string, you can use the API whenever you onboard a new customer. Just clone the report and change the parameter values to connect to the customer’s database. It can also help automate connection updates to data sources that are not supported through Update DataSources API.

  • Change query parameters. By defining parameters on the API, you can set the values and get different results and data to reflect only what this report’s users should see.

  • Measure parameters. Dynamically change different calculated measures to answer each customer’s needs on the same report. For example, you can set the currency through parameters for different customers or branches based in different countries.

The parameters are based on the dataset; therefore, they’re defined per report or dashboard, but they’re not defined on the user’s session level. It means that different users using the same report at the same time will always see the same parameter’s value.