Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everyone,
I'm working on a Power BI project where I need to access an API using M Parameters. My goal is to make dynamic API calls by selecting parameters from the dashboard through a slicer. So far, I've successfully set up the connection to the API and configured the parameter (in my example below it is called PARAMETER), but I haven't been able to make dynamic calls to the API yet. I know it's possible to make dynamic calls for GET requests using the RelativePath functionality of Web.Contents, but I'm stuck on how to achieve something similar for POST requests.
Currently, I can only update the query from the dashboard via the following route: Home > Transform data > Edit parameters. However, I would like to do it directly from the dashboard using a slicer. Is there any way I can do this?
Here's my current query:
let
headers = [
#"Content-Type" = "application/json",
],
Body = " { ""criteria"": """& PARAMETER &"""}"
RelativePath = "somePath",
options = [
RelativePath = RelativePath,
Headers = headers,
Content = Text.ToBinary(Body),
ManualStatusHandling = {400,404,500}
],
Source = Web.Contents("main_url", options),
Response = Json.Document(Source),
in
Response
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
9 | |
7 | |
6 | |
6 |