Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is this possible - and how would I do it?

I have an image bank of 12 images - and every time the Qlikview document is refreshed - I'd like a random one of these images to pop up on the first report screen.

I thought I should be able to generate a random number between 1 and 12 - and then link the value retuned to an image.

is this possible and how do i use both the RAND() function and link to a picture file?

Cheers chaps, your help is, as always, appreciated.

2 Replies
Not applicable
Author

Hi,

during loadtime you could use the exxpression as below to calculate a randon value based on RAND() which returns a random value between 1 and 12

mod (floor(RAND()*100)+1,12) + 1

If the syntax for yopur Picture is "Picture" + "Number" you could use


LET PicFile='Picture' & NUM(mod (floor(RAND()*100)+1,12) + 1) & '.jpg';

If the Picture file located in the same directory as the QVW file just create a screen box on the sheet and set the Text as

=PicFile

And representation as Picture and it should run as desired.

Best regards

Not applicable
Author

Many thanks Michael for the response

I'll give it a try and let you all know how i get on

Kind Regards

Mark...