Divide, Multiple and result is a percentage Jun 02, 2017 By RECO Education Hi Everyone I'm looking for a way to divide one number from another and the answer will be converted to a percentage. Does anyone have a breakdown of the triggers/variables? ThanksSandy
Phil Mayor Hero almost 7 years ago06/02/17 at 3:34 pm (UTC) It is as you describe it: A/B * 100 = C% I would alway use intermediate variables to ensure that you do not destroy the initial values. Create Variable called Answer Triggers Assign value of Answer to 0 Assign value of B to Answer Adjust Variable Answer Divide by A Multiply Answer by 100 Then add a reference as %Answer%% that should work.
RECO Education Author almost 7 years ago06/02/17 at 6:41 pm (UTC) Hi Phil Thanks for providing the details, however it didn't work. To provide a bit more contents, I have to do the following: $A/$B * 100 = C% Then, in the feedback I have to show a dollar value for what users inputted for A and B. Any thoughts on what I can do? ThanksSandy
Phil Mayor Hero almost 7 years ago06/04/17 at 8:22 pm (UTC) Are the two values strings (text) instead of numbers? I thought you needed percentage? Should be simple to do? It may be that you just add a dollar before the value they type in (although two decimal places can be a problem.
RECO Education Author almost 7 years ago06/14/17 at 9:31 pm (UTC) Hi Phil this is great - how do I remove extra 00s from my answer
RECO Education Author almost 7 years ago06/15/17 at 1:53 pm (UTC) Hi Phil Here's what's happening: on base layer users are entering a $number/$number = percent answer when the get to the feedback layer, the second $number has extra 000s For example It should read: $850,500/$14,175,000=0.06% However, the following is happening: $850500/$1417500000=0.06% How do I get rid of the extra 00s in the second $number? Do you happen to know how to add commas as well? ThanksSandy
6 Replies
It is as you describe it:
A/B * 100 = C%
I would alway use intermediate variables to ensure that you do not destroy the initial values.
Create Variable called Answer
Triggers
Assign value of Answer to 0
Assign value of B to Answer
Adjust Variable Answer Divide by A
Multiply Answer by 100
Then add a reference as %Answer%%
that should work.
Hi Phil Thanks for providing the details, however it didn't work. To provide a bit more contents, I have to do the following:
$A/$B * 100 = C%
Then, in the feedback I have to show a dollar value for what users inputted for A and B.
Any thoughts on what I can do?
Thanks
Sandy
Are the two values strings (text) instead of numbers?
I thought you needed percentage?
Should be simple to do?
It may be that you just add a dollar before the value they type in (although two decimal places can be a problem.
Hi Phil this is great - how do I remove extra 00s from my answer
does it need rounding?
Hi Phil
Here's what's happening:
on base layer users are entering a $number/$number = percent answer
when the get to the feedback layer, the second $number has extra 000s
For example
It should read: $850,500/$14,175,000=0.06%
However, the following is happening: $850500/$1417500000=0.06%
How do I get rid of the extra 00s in the second $number?
Do you happen to know how to add commas as well?
Thanks
Sandy
This discussion is closed. You can start a new discussion or contact Articulate Support.