Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ashishpalkar
Creator III
Creator III

Random Number

Hi There

How to write random number in Qlik like this.

I am using excel formula like below.

Data!B367+RANDBETWEEN(-30,30)

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

In your script, use e.g.

Let vNumber = ROUND(RAND()*60)-30;

The variable vNumber is updated on each reload of the script.

View solution in original post

5 Replies
swuehl
MVP
MVP

Something like

ROUND(RAND()*60) -30

ashishpalkar
Creator III
Creator III
Author

Thanks Stefan , but this value is changing in every click. I want something where value changes only after opening / refreshing the App.

swuehl
MVP
MVP

Then either calculate the number in your script or use a document OnOpen trigger action to set a variable once when opening.

ashishpalkar
Creator III
Creator III
Author

How we can do this in Qlik sense ?

swuehl
MVP
MVP

In your script, use e.g.

Let vNumber = ROUND(RAND()*60)-30;

The variable vNumber is updated on each reload of the script.