Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
brf10043
Contributor

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.

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Select random value

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

2 Replies
MVP
MVP

Re: Select random value

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

brf10043
Contributor

Re: Select random value

That did it!  Thanks !