Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Autogeneration of a number at front end

Hello All,

How to generate a auto number at front end in qlikview?

I tried rowno() but its not working...

any other function?

Regards,

Balraj

28 Replies
ecolomer
Master II
Master II

you can use the function:

RAND()

In a text box, put =rand() for a numbre >0 and <1

if you need a numbre 0<x<20

put  =ceil(rand()*20)

Not applicable
Author

Use rowno() as SNo to create a new field in your load script and then use that filed as your dimension

hope that helps

Joe

er_mohit
Master II
Master II

Hi have you tried with aggr function like

aggr(Rowno(),Your key field)

alike this

=aggr(RowNo(),CustomerKey) //here CustomerKey is my key field used in report

Hope it helps

Not applicable
Author

Rand is random between 0 and 1, not sure how that would help?

ecolomer
Master II
Master II

Indeed RAND () generates a number between 0 and 1, but supplemented by other functions like ceil, and multiplying the value generated by the upper limit value (N) you want, you faculmente get a number between 0 and N

anbu1984
Master III
Master III

Can you attach sample qvw

Anonymous
Not applicable
Author

Mohit,

If I am not giving any selection, its working fine.

But after selection its giving some value blank and some ids...

Not applicable
Author

Try valuelist() or valueloop() functions in the dimension.

Valuelist(1,2,24,3) would return the numbers as a dimension each in the chart. Eg one row for

1

2

24

3

If you want to generate lots of numbers, use valueloop() with the parameters from,to,step.

Eg to generate even numbers from 10 20, use valueloop(10,20,2)

Erica

Anonymous
Not applicable
Author

Erica,

Got it but to use valueloop() I should have Endpoint say for even numbers you have 20.

But in my case I to want auto generate to the number of records I am having to represent.

To apply valueloop() I have to count number of records but if I do any selection then I have doubt whether it will work properly.

Not applicable
Author

Using ceil like that will just give you a random between 1 and 20 then, not every number between 1 and 20, unless I am missing something?