Skip to main content

Use parameters and custom functions to call APIs in Power BI

by Karan Nair
Data Analyst and Consultant, Addend Analytics

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

About Karan Nair

Karan Nair is working as an expert consultant and leads the Data Analytics department in Addend Analytics. Having a core interest and passion in applying Data for solving business problems, he is a voracious reader in the Data Analytics domain. Currently, Karan is working on multiple North American Power BI implementation Projects.  

Addend Analytics is a Microsoft Certified Partner which is a young and rapidly growing Data Analytics consultancy. It specializes in the application of Business Intelligence and Data Science tools to solve business challenges some of which includes extracting data from disparate data sources like Databases, SaaS applications, ERP, QuickBooks, IoT devices, spreadsheets, creating on-premises or Cloud Data Warehouses using ETL process, Analyzing Data using Microsoft Power BI, Creating Insightful Reports and embedding Power BI reports into Apps. Addend Analytics has been credited with the successful implementation of Power BI projects for 100+ clients across multiple sectors like Finance, Professional Services, Retail, Sales, Real estate, Inventory, and countries like the US, Europe, Australia, and India. You can explore their services at www.addendanalytics.com 

More about Karan Nair