How to assign one numeric variable based on another

I am a bit stumped. I am writing an app that produces a numeric score. I need to convert that score to a percentile. The score range is from 8 to 40. An 8 is the 99th percentile and 40 is the 1st percentile. What would be the best way to do this conversion in appgyver?

I think it would be something like this:

1-PERCENT_RANK(appVars.scoreRange, appVars.score)

This will return a number from 1 to 0. If the result is 8 then it will be 1, if 40, then 0. So if You need it as a percent then just format it accordingly or add to the formula (previous formula)*100

Read more about the percentile rank here:

Is your percentile calculation linear?

If linear its fairly straight forward, just normalise the start and end values to make the range 1-99 and invert it by subtracting it from 100.

No it isnt linear. The app I am writing is a type of personality test that uses percentiles from a norming population. But I got it worked out using direct assignment with a series of if then statements using the if then component. It’s a lot of if thens, but it works.

1 Like