Forum Discussion
Manual data input by the user
Hi all,
In order to do some calculations, I need to let the user provide the value of a variable (a whole number in this case). Is there any way in PowerBI to create some kind of box where the user types in a value and then I can use it in my DAX formulas?
Thanks in advance!
- Anonymous6 years ago
HI Anonymous
1. Create a new "What If" parameter under the Modeling Tab:
Clicking this button will bring up a new window with several input options.
2. Enter the range of numbers and the number of steps in between:
Name: This is the name of your parameter (input variable).
Data Type: This defines the type of variable. Whole number, Decimal number or Fixed decimal number.
Minimum & Maximum: These are the starting and ending numbers for your variable (think of it like a range of valid inputs).
Increment: This represents the increment between your minimum and maximum values. This will affect how many values can be selected as an input.
After you have your range of numbers (values entered for Minimum, Maximum) and the increment, click OK and Power BI will insert a new table for you in your DAX model. This is your table of valid input options for your users.
Anonymous
What about powerapps form like a box, and this value will go to sharepoint or azure data base and then will be updated back to powerbi and will be used in DAX.
- Anonymous6 years ago
Hi Anonymous
In your intial ask I believe live connection is not mentioned.
You are right, with live connection/streaming dataset you can't create a parameter or table as there is no M query involved.
6 Replies
- AnonymousNot applicable
HI Anonymous
1. Create a new "What If" parameter under the Modeling Tab:
Clicking this button will bring up a new window with several input options.
2. Enter the range of numbers and the number of steps in between:
Name: This is the name of your parameter (input variable).
Data Type: This defines the type of variable. Whole number, Decimal number or Fixed decimal number.
Minimum & Maximum: These are the starting and ending numbers for your variable (think of it like a range of valid inputs).
Increment: This represents the increment between your minimum and maximum values. This will affect how many values can be selected as an input.
After you have your range of numbers (values entered for Minimum, Maximum) and the increment, click OK and Power BI will insert a new table for you in your DAX model. This is your table of valid input options for your users.
- AnonymousNot applicable
Thanks, this is precisely what I was looking for! 🙂
I've checked this works in a PBI in which I imported data from a database.
I've tried to do the same in a PBI whith a live connection to a cube (Get Data -> SQL Service Analysys Services database -> Connect live) but the "New parameter" button is inactive there. Can you figure out any alternative to get an input from the user in that scenario? If not, I could solve it somehow by adding a new table with a wide range of values and then putting a slicer on the report, but I don't see a way to create a table either.
- AnonymousNot applicable
Hi Anonymous ,
Do you know how that can work in a PBI whith a live connection to a cube (Get Data -> SQL Service Analysys Services database -> Connect live)? The "New parameter" button is inactive there.
If not possible, is there any other way to capture input data from the user? Alternatively, I've tried to create a table with lots of value from which the user can chose with a slicer, but I didn't manage to create that table either while the PBI has a live connection to the cube.
Thanks.
- AnonymousNot applicable
Hi Anonymous
In your intial ask I believe live connection is not mentioned.
You are right, with live connection/streaming dataset you can't create a parameter or table as there is no M query involved.
- mhossainSolution Sage
Anonymous
What about powerapps form like a box, and this value will go to sharepoint or azure data base and then will be updated back to powerbi and will be used in DAX.
- AnonymousNot applicable
mhossain I've never used Powerapps. The idea sounds good though and I will now try to find how to implement it.
Thanks!