Qlik Community

Qlik Design Blog

All about product and Qlik solutions: scripting, data modeling, visual design, extensions, best practices, etc.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
Jennell_McIntire
Employee
Employee

A few months ago, I worked on a ROI Calculator project that allowed me to use QlikView in a way that is not often used.  In this application, users entered various data and assumptions into input boxes that were then used to calculate some financial figures in the script.  One requirement of the application was that users were able to save the assumptions/scenarios they entered and load these scenarios at a later time as a starting point or basis for other scenarios.  I thought I would share how I used input boxes, variables and reloads to fulfill the requirements.

In this example, I simplified the application so that I could focus on what is being done and not so much the calculations in the script.  In the example I created, students can enter their grades to see their average score.

UI.png


Once they enter their data they can click the Save button to store what they entered into a QVD.  Users can also use the Load saved scenario button to select a previous entry to display in the input boxes.  When users click the Load saved scenario button, they are prompted with the window below where they can select the scenario they want to display in the input boxes.

window.png

Reloads are used often in this application to either get the scenario the user wants to see from the scenarios QVD or to save the data entered into the scenarios QVD.  Variables are also used a great deal in the input boxes like this:

input prop.png

There is a variable for each input box on the user interface.  There are also various variables used to determine what action the user would like to perform.  For example, in the script the first thing I check for is whether the user wants to load a selected scenario.  The vLoadScenarios variable is set to 1 when the user clicks the Load saved scenario button.  When vLoadScenarios is equal to 1, the data for the selected scenario is loaded and the variables used in the input boxes are set to the saved values.  Then all the scenarios are loaded into the application.

script.png

Other parts of the script handle creating a table with the entered data and storing it into a QVD.  To view this example application in action and to see the full script, check out my technical brief.

Using input boxes in this manner provides ease of use when entering data.  In the case of the ROI Calculator application, there was several input boxes so being able to use previously entered scenarios as a basis for new scenarios allowed users to “tweak” or make a few changes to their assumptions to determine the ROI impact.

Thanks,

Jennell

24 Comments