I Need Help Setting Up Variables to Perform Calculations Correctly

Hi Everyone,

I need some help setting up variables to perform calculations correctly. This is what I want to achieve.

Learners are supposed to do certain actions like review certain slides, watch videos, and click certain tabs in a particular order.

Each module starts with a total risk number which I have named 'RiskStart', as learners do these activities, their 'Risk Score' reduces. The calculation for this is:


RiskScore = ((RiskStart-RiskCount)/RiskStart))X 100

RiskCount is the count of learner doing the number of actions available 


Also, is there a way of adjusting the Results variables? What I want to do is that the learner's final score will be reduced by a certain number based on the range within which their ending RiskScore falls.

For example

1. if the RiskScore is below 10%, the final ResultsScorePercent will not be affected.

2. If RiskScore is from 10% but less than 50%, the final ResultsScorePercent will be reduced by 5%

3. and If RiskScore is more than 50% at the end of the module, the final ResultsScorePercent will be reduced by 10%

Kindly find attached a sample of the file with what I tried doing. Any help in setting this up correctly is appreciated.

 Thanks very much.

8 Replies
Ned Whiteley

Hi Ivy,

In order to carry out your calculation:

RiskScore = ((RiskStart-RiskCount)/RiskStart))X 100

you need to break it down into a series of steps as Storyline will only carry out one mathematical task at a time. What I would suggest is as follows:

a.  RiskScore = RiskDifference    (you have already defined this as RiskStart - RiskCount)

b.  Divide RiskScore by RiskStart

c.  Multiply RiskScore by 100


I am assuming ResultsScorePercent is just a multiplier for the final RiskScore, in which case I would set ResultsScorePercent to an initial value of 1 and then set up two triggers as follows:

a.  Set ResultsScorePercent to 0.95 if RiskScore is >= 10 or < 50

b.  Set ResultsScorePercent to 0.9 if RiskScore is >= 50

All you then need to do is to multiply RiskScore by ResultsScorePercent to get your final value.

Hope this helps.

Ivy Hesse

Thanks, Ned for your response. I am having a hard time setting this up and having it display the RiskScore as the learner progresses through the content. 

With regards to the second part, the ResultScorePercent (I call this Mastery Score and display it at top of slides as the learner progresses through the content and completes quizzes, alongside their RiskScore) is the learners score on quizzes and scenarios and it's different from the actions learner will take to affect their RiskScore.

So the ResultScorePercent is the articulate inbuilt variable that I want to adjust based on the range within which the RiskScore falls at the end of the module. 

So for example, if the learner achieved a RiskScore of 30% and their ResultScorePercent was 65% then their ResultScorePercent (total score on quizzes prior to adjustment) will be reduced by 5% points and their ending ResultScorePercent that will be displayed will be 60%.

How do I do this pls? 



Ned Whiteley

Hi Ivy,

My mistake, I should have recognised Results.ScorePercent as one of Storyline's built-in variables and, as such, I don't think you are able to adjust it as it is specifically designed to maintain the current quiz score. However, to get round this, all you need to do is to create a new variable, which you set to the value of Results.ScorePercent and then adjust this new variable based on the value of RiskScore.

One option you have to display your RiskScore and any other data associated with your quizzes, would be to use a lightbox slide, which could be accessed from a "Current Score" button on each slide. Whenever you clicked the button, the latest data would be displayed until the 'X' icon was selected to close the lightbox slide. This method ensures that the data is always available to the user, but is only displayed when they want it to be. It's a sort of  I'll just check and see how I'm doing  approach.

Setting your new variable to the value of Results.ScorePercent, and any other calculations associated with it, could be triggered to occur when the timeline starts for your lightbox slide. That way, everything would be updated when the user requests their current score.

Hopefully this makes sense, but if you are still having problems with the setup, just give me a shout. :-)

Ivy Hesse

Thanks again, Ned. 

Does it mean that even if I adjust the ResultScorePercent it is still the unadjusted, inbuilt ResultScorePercent that will be reported to an LMS for instance?

Also, is it possible to trigger to show the learner's MasterScore and RiskScore on the page of every scenario/quiz automatically (these scores are calculated at the end of each quiz/scenario, displayed on the User dashboard which shows in a lightbox as well as on each quiz/scenario page as learner progresses as shown in image below), instead of having the learner press a button before it is triggered?

Quiz Screen with Running Scores

Thanks again for your help.

Ned Whiteley

Hi Ivy,

Unfortunately I don't know enough about the built-in variables to know for certain if you can adjust them or not and, if you can, which figure (the adjusted or the original) is reported to your LMS. However, to be on the safe side, I would still recommend setting up a new variable and adjust that as necessary.

In answer to your second question, you don't need to have a lightbox slide for your results if you don't want to.  If you wish to display the updated Mastery and Compliance Risk in your top banner (as in your example above), I would recommend setting up triggers that are activated when the Results.ScorePercent variable changes.  That way, every time a new question is answered, your new variable will be updated, which will then update your Mastery.

For the sake of the example below, I have called the new variable AdjustedResultsPercent: