
Not applicable
2015-05-03
02:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to create Random number within specific range in Qlikview/Qliksense in script ?
Hi,
How can we create random number between specific range.
Let us suppose we need to generate random no. between 0.85 to 1.05, how can we do it ?
Thanks in advance.
1 Solution
Accepted Solutions

Partner - Champion III
2015-05-03
03:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[TenRandomNumbers]:
LOAD
Rand() * (1.05-0.85 ) + 0.85 AS myRandomNumber
AUTOGENERATE
10;
If you need it to include 1.05 exactly then add a Round()-function like this
Round( Rand() * (1.05-0.85 ) + 0.85 , 0.01) AS myRandomNumber
2 Replies

Partner - Champion III
2015-05-03
03:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[TenRandomNumbers]:
LOAD
Rand() * (1.05-0.85 ) + 0.85 AS myRandomNumber
AUTOGENERATE
10;
If you need it to include 1.05 exactly then add a Round()-function like this
Round( Rand() * (1.05-0.85 ) + 0.85 , 0.01) AS myRandomNumber

Not applicable
2015-05-03
03:18 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot, it worked.
17,749 Views
