Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Sammy22
Helper I
Helper I

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?

 

Sammy22_1-1709218313121.png

 

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

@Sammy22 

 

Daniel29195_0-1709220255560.png

 

create a numeric range  .you can set the min , max and the increment. ( 1, or 0.1 ..etc.. ) 

Daniel29195_1-1709220286095.png

 

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! 🤠

 

View solution in original post

7 REPLIES 7
Daniel29195
Super User
Super User

@Sammy22 

 

Daniel29195_0-1709220255560.png

 

create a numeric range  .you can set the min , max and the increment. ( 1, or 0.1 ..etc.. ) 

Daniel29195_1-1709220286095.png

 

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! 🤠

 

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?

selectedvalue( Paramter[field_name]) , 1 )

 

what should be entered in field name? this has not been defined in the process??

@Sammy22 

you can refer to this video : 

https://www.youtube.com/watch?v=6a_5uderwAg

 

@Sammy22 

the field name is the name of the column name created when creating the range . 

like in my exmple, 

Daniel29195_0-1709222019728.png

 

the name is Paramter,  so :  selectedvalue(paramter[Paramter]) 

 

 

In this scenario, field name is just a generic name because we do not know exactly what it is named in your parameter. If you open the table that is automatically created when you setup the parameter, you will see a name for the column that stores the number values. This is what is meant by [Field_Name].

amitchandak
Super User
Super 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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.