Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need rownr in 2nd expression

The table below is what I show.

table.png

The grey values are expressions, the white ones are the dimensions.

In the field count I need a number which counts up from 1, 2, 3, 4, 5, .. .etc (just from first to last row)

I tried the function RowNo():

table2.png

And the function RowNo(TOTAL)

table3.png


The RowNo(TOTAL) looks somehow what I need, but I only need the rows with a value.

When saying that to the count column it shows the numbers 3, 5, 6 . . . instead of 1, 2, 3

Anyone knows how to handle this?? I just need some numbering for an export.

thx in advance,

Anita

7 Replies
Not applicable
Author

Try.. Rank()

Or..  If(value>'0',Rank()) or If(value>'0',RowNo(TOTAL))

Gysbert_Wassenaar

Have you tried enabling the Supress Missing Values option?


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Supress missing values only works for dimensions??

In this case I have an expression which removes the values . . .

Anonymous
Not applicable
Author

Rank(...) is not exactly what I look for since this needs some field to rank on . . .

Did rank on value for test . . . but now I get empty rows ( null() ) which I can't really seem to get rid of ...

table4.png

expression for the count column:

if(

count(distinct

if(

  (Serviceorders.EventType = 1 and Serviceorders.Orderdatumtijd >= timestamp(vLastLoadDateTimeNUM))

  or

  (Serviceorders.EventType = 3 and Serviceorders.Einddatumtijd >= timestamp(vLastLoadDateTimeNUM))

  ,

  Serviceorders.Serviceordernr

  )

)

> 0,

rank(total value)

)

thx

Anonymous
Not applicable
Author

If ranking a value ... the problem which occurs is that if a value is shown more than once the rank shows e.g. 5-6 (see sample below)

table5.png

is there another way to show just a 'front' number which just adds one up

thx

Gysbert_Wassenaar

Try:

if(IsNull(Value),'', RangeCount(above(total Value,0,RowNo(total))))


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

I did try, but this didn't work the way I thought it would