# Adding slider values

I am new to Storyline and am trying to use sliders to enable "what if" analysis on a simple table.

So, for example, I have a table with three lines Sales, Direct costs, Expenses and a total (Profit) which is Sales less the other two.

Example, 100, -50, -30 then profit = 20

I have a slider that enables me to move the sales number up or down, and another that does the same for the expenses. I then just want to do that simple arithmetic to calculate the total.

The problem I'm getting is that the total just keeps going up. So each time I click on a slider it adds the value of that to the existing total. So in the example above, moving the sales slider to 110, adds 110 to the profit, moving it down to 90, adds another 90.

I'm sure I'm missing something very simple here. Can someone help?

Thanks.

## 2 Replies

Whenever any of the slider values changes, you need to first reset the total value to 0, before recalculating.

Thanks Michael. That got me there. Having reset the total to zero when a slider moves, I then need to have triggers on all sliders that add the values of all the other sliders. A bit clumsy but it works.