USING CALCULATE RANDOM FUNCTION

Hello Team
I have been using the calculate to try and generate a random number between 1 and a given value which is defined by a number in a previous question.
I wrote this within the function calculate=“random()” and it was able to generate a random number between 0 and 1 but not including 1. I would however like to modify this to be able to generate a random number between 1 and a maximum which is set by a previous question. Anyone with information on how to do this.

Thank You in advance.