Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
samsbor
Contributor
Contributor

Assigning random numbers between 1 and 6 to certain dates.

Hello. I'm new to using Qlik and I have a question.

I have a date data and start: 2020-01-01 end:2022-02-21

I'm going to create a field called Ranking for all of the date data and assign a random number between 1 and 6 to all dates that are the first day of the month between the start and end dates. However, I could never do that. Is there anyone who can help with this?

Thanks.

Labels (3)
1 Reply
vikasmahajan

LOAD 
    Floor(Rand()  *  5) AS RandValue
AutoGenerate 1000000;​

you can use Rand() function to generate nos.  use autogenerate till 6 .

vikas 

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.