Forum Discussion

A_Murray's avatar
A_Murray
New Member
3 years ago
Solved

Variable (from a slider) in a new column calculation

Looking for help with building a % slider that changes column calculations. So for example a column that shows a variance where

if( [Col X] > ([Col Y] * variable), 1, 0).

 

"Variable" in this instance is a % from a slider from 100% to 150% in 1% increments.

Does the slider need to be created as a parameter and if so can that parameter be introduced as a part of the calc in a new column?

  • HughLa's avatar
    HughLa
    3 years ago

    Here is an example of what you are trying to achieve. I believe.

    You have to use the Value Measure that is created because that returns the selected value form the slider.

     

    Hope I make sense.

     

6 Replies

  • Hi A_Murray 

     

    Yes, you will have to create a numeric range parameter:

    A slider like this is then created:

     

    This table is also created with these two fiels(one column and one measure):

    Then in your formula you'd use the measure which returns the selected value.

     

    Per Value = SELECTEDVALUE('Per'[Per], 1)

     

     

    Hope this helps you.

    Hugh

  • I have created, I think, just like that but it seems to just pick up the default ,1 as 100%. If I change the formula to ,1.2 it will pick up 120% and not the value from the slicer. 

    • HughLa's avatar
      HughLa
      Icon for Resolver IV rankResolver IV

      Here is an example of what you are trying to achieve. I believe.

      You have to use the Value Measure that is created because that returns the selected value form the slider.

       

      Hope I make sense.

       

    • A_Murray's avatar
      A_Murray
      New Member

      I did try that but getting error (my parameter is "Buffer" where you've called yours "Per")

       

       

      • A_Murray's avatar
        A_Murray
        New Member

        Sorry got that wrong. All corrected now. Thank you