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

Can recno() be used in charts?

Hi guys,

I want to read the number of the currently read row of the current table in chart. But recno() seems to be a script function. Is there a similar one for charts?

7 Replies
Ksrinivasan
Specialist
Specialist

hi,

yes, but you can use RowNo()

Ksrinivasan_0-1611939648357.png

 

RowNo -scriptfunction ThisfunctionreturnsanintegerforthepositionofthecurrentrowintheresultingQlikSenseinternaltable. Thefirstrowisnumber1. RowNo ( ) RowNo -chartfunction RowNo()returnsthenumberofthecurrentrowwithinthecurrentcolumnsegmentinatable.Forbitmap charts,RowNo() returnsthenumberofthecurrentrowwithinthechart'sstraighttableequivalent.

ksrinivasan

 

wanyunyang
Creator III
Creator III
Author

Hello,

 

Thank you for your reply! But I only want to read the number of the currently read row of the current table (filtered), and rowno() gives result before filtering.

Ksrinivasan
Specialist
Specialist

hi,

Ksrinivasan_0-1611941190785.png

result:

Ksrinivasan_1-1611941258210.png

 

 

Tab1: LOAD * INLINE [A, B 1, aa 2,cc 3,ee];
Tab2: LOAD * INLINE [C, D 5, xx 4,yy 6,zz];
Loadingrecordandrownumbersforselectedrows:
QTab: LOAD *, RecNo( ), RowNo( ) resident Tab1 where A<>2;
LOAD C as A, D as B, RecNo( ), RowNo( ) resident Tab2 where A<>5;
//We don't need the source tables anymore, so we drop them Drop tables Tab1, Tab2; TheresultingQlikSenseinternaltable:
A B RecNo( ) RowNo( )
1 aa 1 1
3 ee 3 2
4 yy 2 3
6 zz 3 4

ksrinivasan

wanyunyang
Creator III
Creator III
Author

Oh I see! I mixed recno() and rowno() 😅 Sorry.

But when I add rowno() as a measure in the straight table, results are all 1...

wanyunyang
Creator III
Creator III
Author

I got it. I should use row(Total)

Ksrinivasan
Specialist
Specialist

hi,

okey,

are you in japan or china!!!!

ksrinivasan

wanyunyang
Creator III
Creator III
Author

i'm from china