Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
afuchten
Valued Contributor

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

Re: Need rownr in 2nd expression

Try.. Rank()

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

Re: Need rownr in 2nd expression

Have you tried enabling the Supress Missing Values option?


talk is cheap, supply exceeds demand
afuchten
Valued Contributor

Re: Need rownr in 2nd expression

Supress missing values only works for dimensions??

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

afuchten
Valued Contributor

Re: Need rownr in 2nd expression

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

Highlighted
afuchten
Valued Contributor

Re: Need rownr in 2nd expression

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

Re: Need rownr in 2nd expression

Try:

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


talk is cheap, supply exceeds demand
afuchten
Valued Contributor

Re: Need rownr in 2nd expression

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

Community Browser