Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Row Counter in Chart

Hi All,

This is a silly question..but couldn't fix it.I have a chart where I need to add serial number like every time as per user's selection the chart will display number of rows.I need to put a serial number in the chart.

example:

CityName
CAJoe
NYJohn
VAKelly
TXLisa
MNLeah


Here I need to add serial number

Serial no.CityName
1CAJoe
2NYJohn
3VAKelly
4TXLisa
5MNLeah


I tried recno() and rowno(),but didn't get the numbers as I expected.Can anyone plz help on this?

Thanks,Pooja

1 Solution

Accepted Solutions
MVP
MVP

So you have one dimension City and an expression which returns a name?

I think another expression

=rowno()

should just work fine. You could drag the column in front using a straight table.

If you have more than one dimension, try a rowno(total).

Or am I missing something here?

View solution in original post

4 Replies
MVP
MVP

So you have one dimension City and an expression which returns a name?

I think another expression

=rowno()

should just work fine. You could drag the column in front using a straight table.

If you have more than one dimension, try a rowno(total).

Or am I missing something here?

View solution in original post

Not applicable

Thanks for your reply.Row(total) worked as I have more than one dimensions.

I have one more question..

Straight Table Chart contains

date1date2daysrow(total)
11/5/201111/1/201141
11/5/201111/3/201122
11/10/201111/5/201153
11/22/201111/21/201114

days and row(total) are expressions.

after adding row(total),now sorting on days(descending) order not working.The days should look like below

daysrow(total)
51
42
23
14

is there a way it can be fixed.when I remove this row(total) sorting works fine.

MVP
MVP

The reason why the sort doesn't seem to work is because rowno() is a chart inter record function, and for these functions the Help states:

Note: Sorting on y-values in charts or sorting by expression columns in straight tables is not allowed when Chart Inter Record functions are used in any of the chart's expressions. These sort alternatives are therefore automatically disabled.

Suppression of zero values is automatically disabled when these functions are used.

Though sorting on numerical should work if I read above lines correctly, in fact it seems it doesn't work correctly.

You are probably using something like =date1-date2 as expression to calculate days, right?

Try moving this expresssion to dimensions as third, calculated dimension. Then sorting on days descending seems to work, having only one expression, rowno(total).

Contributor III
Contributor III

Hay

And If I want It Upsite Down order?