Use parameters and custom functions to call APIs in Power BI
If you are familiar with general concepts around calling APIs using a programming language, you probably know how to handle the challenges of paging and adding dynamic inputs in the endpoints. While Power BI allows for connecting to data sources via API, it offers no direct solutions for these common needs. Instead, we can make use of the parameters and custom function feature to overcome the problem of paging and we can dynamically change the text (e.g. id) in the API’s endpoint.
I have already written a detailed blog post on how to get data into Power BI using an API which you can find here. In this article, I’m going to explain how you can dynamically call the API based on its location.
What are Parameters in Power BI?
In Power BI Desktop, you can add Query Parameters to a table/query and make elements of the table dependent on those parameters. You can have one parameter, or multiple parameters for any table. Let's take a look at how to create parameters in Power BI Desktop.
Steps to create parameters:
FREE Membership Required to View Full Content:
Joining MSDynamicsWorld.com gives you free, unlimited access to news, analysis, white papers, case studies, product brochures, and more. You can also receive periodic email newsletters with the latest relevant articles and content updates.
Learn more about us here
or
login
FREE Membership Required to View Full Content:
Joining MSDynamicsWorld.com gives you free, unlimited access to news, analysis, white papers, case studies, product brochures, and more. You can also receive periodic email newsletters with the latest relevant articles and content updates.
Learn more about us here