Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
lalitkgehlot89
Contributor II

Logic to generate number from 50.00 to 99.99.

Hi,

Please provide the logic to generate numbers from 50.00 to 99.99.

6 Replies
olivierrobin
Valued Contributor II

Re: Logic to generate number from 50.00 to 99.99.

hello

something like

for i=5000 to 9999

let nb=i/100;

next i

adapt it to your need

Highlighted
Partner
Partner

Re: Logic to generate number from 50.00 to 99.99.

Hi you can use rand() function it gives random values between 0 and 1.

You can write    

50+Rand()*50


Regards,

Devyanshu

ogautier62
Valued Contributor II

Re: Logic to generate number from 50.00 to 99.99.

Hi,

to generate random numbers ?

if so :

50 + rand()*50

regards

Partner
Partner

Re: Logic to generate number from 50.00 to 99.99.

LOAD

50000+RECNO() AS Nr

AutoGenerate(10000-5000);

Re: Logic to generate number from 50.00 to 99.99.

What purpose you used this? May be like

LOAD Num(RowNo() + 49.00,'##.00') as Field

AutoGenerate 50;

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
MVP
MVP

Re: Logic to generate number from 50.00 to 99.99.

That depends on your number step. Try the below code where you can even set your step:

Let vStep=0.1;

Load

       (RowNo()-1)*$(vStep)+50 as Num

AutoGenerate (99.99-50)/$(vStep);

Capture.JPG