Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear Experts,
I need your help with the following scenario.
I am fetching data from SAP S4 HANA CDS Views into Power BI through Odataservice. The Odataservice URL has the parameter values hardcoded, which is why my report shows data only for that particular value. To be more specific, company code is the parameter which is getting data only for one value say 1000. I want to make this dynamic and allow users to enter whatever Company code value they want and the report should be able to display it. Can someone please help me with the issue.
You help is much appreciated.
Thank you in advance.
Solved! Go to Solution.
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.
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 8 | |
| 7 |