Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Assigning random numbers to customer numbers/index

Hello,

I'm trying to assign random numbers to my customer numbers. 1st step was to index every customer number like this:
autonumber (sCustomerNumber)                                as [Customer Number]

The 2nd step is to assign each and every index with a number between 1-1000.


Can anyone share with me how to do this? =)


Sincerely,

Betty Habtemariam


Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Assigning random numbers to customer numbers/index

UPDATE: I don't think this is going to work

May be this:

AutoNumber(sCustomerNumber) * Ceil(Rand()*1000) as [Customer Number]

3 Replies
MVP
MVP

Re: Assigning random numbers to customer numbers/index

UPDATE: I don't think this is going to work

May be this:

AutoNumber(sCustomerNumber) * Ceil(Rand()*1000) as [Customer Number]

Not applicable

Re: Assigning random numbers to customer numbers/index

Actually it did work, haha! Thank you! So I was wondering if you could answer another question too.

If I would l
ike to assign a product name with a number anywhere between 1-1000, how would I do that without loosing the products' name? (I've tried to do that, but the products' name disappear and is replaced with the numbers).

Sincerely,

Betty Habtemariam

MVP
MVP

Re: Assigning random numbers to customer numbers/index

May be this:

ProductName & AutoNumber(sCustomerNumber) * Ceil(Rand()*1000) as [Customer Number]