Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
henning_s
Contributor III
Contributor III

Show current line of table

Hi,

is it possible to show the current line of a table in the first column.

For example if the table got two entries:

current lineHeader 2Header 3
1foobar
2foobar

And if the selection results in a table with 4 entries:

current lineHeader 2Header 3
1foobar
2foobar
3foobar
4foobar

I hope my question is understandable.

Any hint or sollution is very welcome.

Thanks in advance

1 Solution

Accepted Solutions
swuehl
MVP
MVP

No, it will not work, because a table box doesn't support expressions.

Create a straight table (Create new sheet object --> Charts... then select the straight table object from general tab (the one with the sum symbol))

Create your table as you like and as expression, put in

=rowno(total)

You then can drag the column with the linenumber to the left (click on the header, drag the column keepin button pressed).

See also attached (if you can open other's qvw).

Stefan

View solution in original post

11 Replies
jagannalla
Partner
Partner

Hello,

Can you explain breifly, i didn't get what you said.

swuehl
MVP
MVP

You are talking of chart table objects, right?

You can create an expression in a straight table chart

=rowno(total)

and then drag the column to the left.

henning_s
Contributor III
Contributor III
Author

Thank you for your response!

I added following line in the script:

     RowNo() as Row

No I´ve got a number in front of every row.

But that numbers are static. For example if I select one product name (Artikelname) and limit the shown data, the original "row number" is shown.

bad.png

Is it posible to get a dynamic row number so it would look like this:

Header 1Header 2
RowArtikelname
1PLE80-100
2PLE80-100
3PLE80-100
4PLE80-100
5PLE80-100
6PLE80-100

I hope what i write does make sense to you and again thanks for the replies

swuehl
MVP
MVP

Hm, yes I think that it is possible, have you tried my original suggestion to create an expression in the chart and not a field in the script?

henning_s
Contributor III
Contributor III
Author

Can you explain, what exactly you mean? Because I am at the moment a qlikview rookie.

I use a table box. Is it possible that your suggestion doesn´t work with that?

swuehl
MVP
MVP

No, it will not work, because a table box doesn't support expressions.

Create a straight table (Create new sheet object --> Charts... then select the straight table object from general tab (the one with the sum symbol))

Create your table as you like and as expression, put in

=rowno(total)

You then can drag the column with the linenumber to the left (click on the header, drag the column keepin button pressed).

See also attached (if you can open other's qvw).

Stefan

View solution in original post

henning_s
Contributor III
Contributor III
Author

Thank you very much!

That solved my problem. Perfect

fbl
Contributor II
Contributor II

hi, would you know how to number the lines, if I display in a straight table, lets say top 5 values.

To get the top 5, I adjust the sort priority to first sort "Value" descending, then check the "Max Number" on the Presentation tab.

I want to show something like

PositionValue
1100
290
385

4

80
550

my sorting always is lost when I use rowNo(Total) or similar.

Any ideas?

swuehl
MVP
MVP

Yes, sorting on y-values in charts or sorting by expression columns in straight tables is not allowed when Chart Inter Record (like rowno() ) functions are used in any of the chart's expressions.

But for a position by value or rank by value you can try

=rank(sum(Value))