Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 line | Header 2 | Header 3 |
---|---|---|
1 | foo | bar |
2 | foo | bar |
And if the selection results in a table with 4 entries:
current line | Header 2 | Header 3 |
---|---|---|
1 | foo | bar |
2 | foo | bar |
3 | foo | bar |
4 | foo | bar |
I hope my question is understandable.
Any hint or sollution is very welcome.
Thanks in advance
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
Hello,
Can you explain breifly, i didn't get what you said.
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.
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.
Is it posible to get a dynamic row number so it would look like this:
Header 1 | Header 2 |
---|---|
Row | Artikelname |
1 | PLE80-100 |
2 | PLE80-100 |
3 | PLE80-100 |
4 | PLE80-100 |
5 | PLE80-100 |
6 | PLE80-100 |
I hope what i write does make sense to you and again thanks for the replies
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?
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?
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
Thank you very much!
That solved my problem. Perfect
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
Position | Value |
---|---|
1 | 100 |
2 | 90 |
3 | 85 |
4 | 80 |
5 | 50 |
my sorting always is lost when I use rowNo(Total) or similar.
Any ideas?
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))