Using sliders to create a what-if scenario

What-if scenarios are very important as they allow users to project what future values will look like depending on one or more variables.

In our recipe, we will reuse the simple what-if scenario from a previous recipe, Inputting data values. The only difference here is that we will use a horizontal slider instead of inputting the values with text.

Using sliders to create a what-if scenario

Getting ready

Set up the sales data as shown circled in red in the following screenshot, and have a column chart ready on the canvas. You can also reuse the column chart from the previous recipe.

Getting ready

How to do it...

  1. Insert a Horizontal Slider component from the Single Value | Horizontal Slider section of the Components window into the canvas.
    How to do it...
  2. Set the Title text to Forecasted Change. Bind the Data to cell D3 highlighted in yellow. Set the Minimum Limit to -20 and Maximum Limit to 20 in the Scale section.
    How to do it...
  3. Go to the Appearance section of the slider properties and make sure that the Limits checkbox is checked.
    How to do it...
  4. Now, in the blue chart data area, each formula will be adding the what-if value D3 to the chart data values B3:B6 prepared in the Getting ready section.
    How to do it...
  5. Bind the Forecast Chart values in cells F2:G6 to the Chart Component and then click on Preview.
    How to do it...

How it works...

In this example, the slider controls the what-if value in cell D3. The chart data cells take the user's what-if rate and add it to the current sales values.

See also

For a more complex what-if example, read the What-if scenario – Mortgage Calculator recipe in Appendix A, Real-world Dashboard Case Studies.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset