Forum Discussion
Scenario modelling tool
Hello
Trying to do something that would be very easy in excel (maybe in power bi too). I want to have a field where the user can select the discount %. I then want to use that discount figure to show the sales price. The user would be able to put anything from 0-100% in the discount field/box. What is the easiest way to do this?
create a numeric range .you can set the min , max and the increment. ( 1, or 0.1 ..etc.. )
this will create a table ( in the image above called Paramter ) with one field.
then create a measure =
selectedvalue( Paramter[field_name]) , 1 )
then in your measure that calculates the sales price, you can multiply by the above measure,
hope this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up π and mark it as the solution β
It makes a difference and might help someone else too. Thanks for spreading the good vibes! π€
7 Replies
- Daniel29195Community Champion
create a numeric range .you can set the min , max and the increment. ( 1, or 0.1 ..etc.. )
this will create a table ( in the image above called Paramter ) with one field.
then create a measure =
selectedvalue( Paramter[field_name]) , 1 )
then in your measure that calculates the sales price, you can multiply by the above measure,
hope this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up π and mark it as the solution β
It makes a difference and might help someone else too. Thanks for spreading the good vibes! π€- Sammy22Helper I
selectedvalue( Paramter[field_name]) , 1 )
what should be entered in field name? this has not been defined in the process??
- Daniel29195Community Champion
the field name is the name of the column name created when creating the range .
like in my exmple,
the name is Paramter, so : selectedvalue(paramter[Paramter])
- Sammy22Helper I
Hello,
I have done this and it works except for the fact that my number range should be anything between 1 and 1,000.000. But because parameters can only have 1,000 unique values it doesn't work. Is there a way around this?
- amitchandakSuper User
Sammy22 , You need to use numeric Parameters
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Learn Power BI: Dynamic TOPN using TOPN/Window and Numeric parameter: https://youtu.be/vm2mdEioQPQ