Forum Discussion

josh_cole's avatar
josh_cole
Regular Visitor
6 years ago
Solved

How to make a slider affect numbers without changing the data?

Hey community.

Company NameChance of LeavingContract AmountPotential Revenue
Company A5%$100$95=(100-(100*5%))
Company B10%$100$90=(100-(100*10%))
Company C8$100$92=(100-(100*8%))

 

Im stuck on how best to make a table dynamic based on a slider.  The above example is representative of a data set Im currently analyzing, where I am trying to answer the question "How much money will we be making after some clients leave?".  What my client is asking for is to be able to adjust, up or down, the "Chance of Leaving" value in 1% increments via a slider.  So in the above example, if they wanted to dial them up 1% via the slider the graph would act as if the chance of leaving numbers were 6%, 11% and 9% respectively, even though nothing in the table has changed.  Then we could see how that would affect Potential Revenue.

 

First question, is a slider even the right way to approach this?

Second question, is this even possible.

 

I have been getting around a solution to this issue by setting up scenarios in the actual data table, but then I have to hard code them vs letting the solution be dynamic.  

  • josh_cole this is what I will do

     

    Add following measures

     

    Rev Measure =  
    SUM ( Table[ContractAmount] ) * 
    ( 1 - 
    ( MAX ( Table[ChanceRate] ) + 
    [Whatifparamtervalue] 
    ) 
    )
    
    Total Rev = SUMX ( VALUES ( Table[Customer] ), [Rev Measure] )

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

10 Replies

  • josh_cole yes this can be achieved and what-if parameters (as the name suggests) are designed for such calculations.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

    • parry2k's avatar
      parry2k
      Icon for Super User rankSuper User

      josh_cole this is what I will do

       

      Add following measures

       

      Rev Measure =  
      SUM ( Table[ContractAmount] ) * 
      ( 1 - 
      ( MAX ( Table[ChanceRate] ) + 
      [Whatifparamtervalue] 
      ) 
      )
      
      Total Rev = SUMX ( VALUES ( Table[Customer] ), [Rev Measure] )

       

      I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

      Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

      • josh_cole's avatar
        josh_cole
        Regular Visitor

        parry2k 

         

        Do I have to create the What if parameters before using this formula?

    • josh_cole's avatar
      josh_cole
      Regular Visitor

      camargos88 

       

      I think that this is exactly what I was looking for! But could you walk me through the steps you took to build this solution?

      • camargos88's avatar
        camargos88
        Icon for Community Champion rankCommunity Champion

        Hi josh_cole,

        You need to use what if parameter, just create it from the UI and create a new measure using this parameter in your calculation. 
        Check the measure in the PBIX, if you change the value in the drop down, the measure will update the values.

  • You could create a table with the increments (one per row), and point the slider to this table. Create a measure that multiplies the amount by the SELECTEDVALUE in the increment table.

     

    Potential Revenue = [Contract Amount] - ( [Contract Amount] * SELECTEDVALUE ( [Increment Amount] ) )