Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
May be like this..
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)
Group | Volumen | Priority | ID_1 | ID_2 |
---|---|---|---|---|
A | 1 | 1 | 124 | A_124 |
B | 1 | 1 | 126 | A_126 |
C | 4 | 1 | 127 | A_127 |
2 | 128 | A_128 | ||
3 | 129 | A_129 | ||
4 | 130 | A_130 | ||
D | 1 | 1 | 131 | A_131 |
Attached another approach using an expression.
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.