March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all,
I have a requirement to migrate a Tableau report to Power BI. In tableau, there is a text parameter that takes a string from end user and pass it on to a stored procedure that runs and brings the results in the report. I want to create something similar in Power BI. Can anyone please advise me how can I create a parameter that takes an input string from end user and pass it to a stored procedure? As pe my research, there is a What if parameter that can be shown in the PBI report but the problem is that it only takes numeric values. I want to use a parameter that takes a string.
Any solutions or workarounds are welcomed.
Hi @rizwanmalik, Do you tried changing the type of Parameter, Make sure it is text type then it will accept strings. I have shared few steps below as well via which you can create the parameter.
Create a Text Parameter:
Create a Parameter Table:
Use the Parameter in Power Query:
Bind Parameter to Report Elements:
Publish and Configure:
you can achieve this in Power BI Desktop by creating Parameters in the Power Query Editor. You can open the Power Query editor by clicking on 'Transform Data' in PBI Desktop.
Here is a link to a youtube video explaining the method: https://youtu.be/9rRFh6UQfmY?si=uwp_O1Q4ErIlW2K1
You can integrate Power Apps with Power BI to create a text input field. The input from Power Apps can then be used to call a stored procedure. Here’s a high-level approach:
Although Power BI doesn’t natively support text input parameters in the report view, you can create a query parameter in Power Query:
While default slicers don’t support text input, there are custom visuals available in the Power BI marketplace that allow for text input. One such visual is the “Text Filter”:
If your data source supports Direct Query mode, you can pass the parameter directly to the SQL query:
Check out the Tutorial here if you need some more guidance !!
Setup Dynamic Parameters to Filter data in your PowerBI Report | MiTutorials (youtube.com)
Hi @rizwanmalik -In Power BI, you can create a parameter that takes a string input from the end user and pass it to a stored procedure using a combination of Power Query and dynamic M code
Go to Home > Transform data to open the Power Query Editor.
In the Power Query Editor, go to Manage Parameters > New Parameter.
Name your parameter (e.g., UserInput), set the data type to Text, and set the default value if desired.
Click OK.
Ref:
Parameters - Power Query | Microsoft Learn
Power Query and Stored Procedures with Parameters | Reeves Smith's SQL & BI Blog (wordpress.com)
Hope it helps
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
157 | |
97 | |
79 | |
69 |