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

Adding a serial number in pivot table

I want to add serial number as first column(dimension) in my pivot table. I tired using RowNo() but it doesnt give me expected results because i sort the table on a different measure and adding rowno() , removes the sorting done with a different measure.

Any suggestions on how do i keep the sorting in place as well as add serial no as a first col. in my pivot table?

 

 

 

5 Replies
sergio0592
Specialist III
Specialist III

And in Properties/Sort tab, if use sort with expression ?

fj11
Contributor
Contributor
Author

Already tried sorting  ,with the sorting expression on on 'rowno() dimension'. but then the serial nos are displayed as random numbers like 10, 5, 3,1,7  etc instead on 1,2,3,4,5

I have attached screenshot for your reference for the numbers displayed as serial no. when i add sorting expression on rowNo() dimension

Brett_Bleess
Former Employee
Former Employee

Stupid question, would RecNo() work in this case instead of RowNo()?

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
firoz24
Creator
Creator

I have same issue is it possible ?

Did you find the solution?

marcus_sommer

AFAIK the rowno() dependency to the sorting isn't to change. But you could try to replace it with a rank() approach, like:

aggr(rank(YourSortExpression), Dim1, Dim2)