Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with rowno() in pivot table

Hi!

I have this dataset:

And I have the following table, in which I exclude "ID_1 = 125":

The Priority column is made with rowno() function, so I don't know why it shows the value '2' for "ID_1=126" row, when it would have to be '1', because there is only one 'ID_1' for group 'B'. I thought that rowno() shows the position in the current table, and recno() shows the position in the dataset, it doesn't happen here. The dimensions are:

- Group: =if(ID_1<>125,Group)

- Volumen: =Aggr(count(if(ID_1<>125,ID_1)),Group)

- Priority: =aggr(if(ID_1<>125,rowno()),Group,ID_1)

- ID_1: =if(ID_1<>125,ID_1)

- ID_2: =if(ID_1<>125,ID_2)

Thanks in advance!

13 Replies
settu_periasamy
Master III
Master III

May be like this..

Capture.JPG

swuehl
MVP
MVP

Not really sure what you are trying to achieve or why you are using a calculated dimension for priority, but with a small modification of your original dimension:

=aggr(If(Only({<ID_1 -= {125}>}ID_1), rowno()),Group,ID_1)

GroupVolumenPriorityID_1ID_2
A11124A_124
B11126A_126
C41127A_127
2128A_128
3129A_129
4130A_130
D11131A_131
swuehl
MVP
MVP

Attached another approach using an expression.

Not applicable
Author

Yees swuehl‌!! Your approach is correct First, I've tried without ID_1 = 125 and then without ID_1 = 128, and it works nice in both cases!!

Without ID_1 = 125:

Without ID_1 = 128:

Thanks all for your great effort!

Best regards,

Alejandro.