Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adding row count to the left of a straight table in a Chart

Hi,

How can i add a row count to the left side of a table like this, when the table is sorted to show only the 5 top publishers:

Row NoPublisherRevenue
1Guy1000$
2Dav850$
3Best701$
4Mam300$
5Nana139$

Thanks,

Guy

1 Solution

Accepted Solutions
jykang0638
Partner - Contributor III
Partner - Contributor III

Hi Guy,

Do you open the qvw that created by others? i.e you must have a desktop license or can lease a license from QVS.
If you can, refer to attached qvw.

Steve Kang

View solution in original post

8 Replies
jykang0638
Partner - Contributor III
Partner - Contributor III

Hi Guy,

You can achieve through using RowNo(TOTAL).
Add expression above and move the column before Publisher column.


I hope it helps you.
Steve Kang.

Not applicable
Author

Hi,

It works partly. I am using Straight Table Chart, and the RowNo(TOTAL) expression indeed show the row number, but it also destroys the sorting of the table, so i can not sort it by column Revenue.

Maybe there is solution to this sort problem?

Thanks,

Guy

swuehl
MVP
MVP

If the sort by revenue will not be changed,  the row number equals the rank by sum(Revenue), right?

So you could try using a rank function, like

=rank(sum(Revenue))

instead of the rowno(total) expression.

(For any reason, if you use a chart inter record function like rowno(), the reference 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.

)

If your Revenue values are not distinct, you probably need to check out the mode and format parameter to rank() function, please refer to the Help for that.

Regards,

Stefan

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Go to the sort tab for the table and uncheck all the options for the RowNo column.

-Rob

Not applicable
Author

Hi,

Its helps, the row numbers are shown when using Rank function, but the problem is when i try to move the Rank column to the left of the table,  it loses its numbers...

Thanks a lot anyway!

Guy

Not applicable
Author

Hi,

Unchecking in the Sort Tab didn't help.

Thanks,

Guy

jykang0638
Partner - Contributor III
Partner - Contributor III

Hi Guy,

Do you open the qvw that created by others? i.e you must have a desktop license or can lease a license from QVS.
If you can, refer to attached qvw.

Steve Kang

Not applicable
Author

Thank you! it is an interesting way to solve this problem.