Try this may be:
LOAD Round(Rand() * (200+200) -200, 0.01) as RandValue
UPDATE: This will generate 1000 values between -200 and 200
UPDATE: Stole the idea from here -> How to create Random number within specific range in Qlikview/Qliksense in script ?
John Blomqvist wrote:
Thanks for the reply.
How can I do it so the range is no less than 700 and no higher than 200?
In this case you're talking about a bandwidth of 900, offset by -700, assuming Sunny is correct and you mean -700>x<200
Let vSpread = 900;
Let vOffset = -700;
LOAD $(vSpread) * Rand() + $(vOffset) AS POS_NEG AUTOGENERATE(10);
You could try something like
LOAD 100* (Rand() * sign(Rand() - .5)) AS POS_NEG AUTOGENERATE(10);
For 10 randoms between 100 to -100
then maybe assign a variable for your spread:
Let vSpread = 200; //change bandwidth of randoms as needed
LOAD $(vSpread) * (Rand() * sign(Rand() - .5)) AS POS_NEG AUTOGENERATE(10);