Forum Discussion
Dynamic parameter values in Odataservice URL in Power BI
- Anonymous2 years ago
Hi pearl
If your connect mode is direct query, you can create a paramater in power query, then set the paramater with slicer, you can refer to the following link.
Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
The following sample cannot allow the user to input the parameter, if you want to edit the paramater to change the filter, you can only do it in power query or edit it in data source setting when the report is publised to Service, you can refer to the following link.
Edit parameter settings in the Power BI service - Power BI | Microsoft Learn
Sample data
Step1 Create a paramater in power query
Step 2:
Put the paramater to the code
let para="?$filter=EmployeeID eq "&Text.From(Parameter1), Source = OData.Feed("https://services.odata.org/V3/Northwind/Northwind.svc/Employees"¶, null, [Implementation="2.0"]) in SourceBest Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi pearl
If your connect mode is direct query, you can create a paramater in power query, then set the paramater with slicer, you can refer to the following link.
Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
The following sample cannot allow the user to input the parameter, if you want to edit the paramater to change the filter, you can only do it in power query or edit it in data source setting when the report is publised to Service, you can refer to the following link.
Edit parameter settings in the Power BI service - Power BI | Microsoft Learn
Sample data
Step1 Create a paramater in power query
Step 2:
Put the paramater to the code
let
para="?$filter=EmployeeID eq "&Text.From(Parameter1),
Source = OData.Feed("https://services.odata.org/V3/Northwind/Northwind.svc/Employees"¶, null, [Implementation="2.0"])
in
Source
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Yolo Zhu,
Thank you for the response. That worked actually.
Best Regards,
Pearl