Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
brf10043
Creator
Creator

Select random value

Guys,

I have a table that contains 17 tips for users.  The table has an ID and a Tip (Text).  I want to have a text object that randomly displays on of the tips.

I don't care if the system randomly selects a Tip based on a user logging in or randomly selects a Tip a load to display to everyone that logins in until the next refresh when a different Tip is randomly selected by the load.

This sounds pretty straight forward, but I haven't been able to make it work.

Thanks for any suggestions that you might have.

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

A variable at load time

Let vRand = Ceil(RAND()*17);

and a text box with

=Only({<TipID = {$(vRand)}>} Tip)

should do what you want.

(instead of creating the variable during load, you can probably also use an OnOpen trigger action)

View solution in original post

3 Replies
swuehl
Champion III
Champion III

A variable at load time

Let vRand = Ceil(RAND()*17);

and a text box with

=Only({<TipID = {$(vRand)}>} Tip)

should do what you want.

(instead of creating the variable during load, you can probably also use an OnOpen trigger action)

brf10043
Creator
Creator
Author

That did it!  Thanks !

Ehsan1
Contributor
Contributor

Hi

I have a list containing unique code and name
I want to select one or more names randomly
Thank you for your help