Forum Discussion

Sammy22's avatar
Sammy22
Helper I
2 years ago
Solved

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 

     

     

    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

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    Sammy22 

     

     

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

     

    • Sammy22's avatar
      Sammy22
      Helper I

      selectedvalue( Paramter[field_name]) , 1 )

       

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

      • Daniel29195's avatar
        Daniel29195
        Community Champion

        Sammy22 

        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]) 

         

         

    • Sammy22's avatar
      Sammy22
      Helper 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?