Qlik Community

Россия и СНГ

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
zhuravlevleonid
Contributor II
Contributor II

Как посчитать номер строки без учета нулей?

Добрый день!

Пытаюсь присвоить каждой строчке в таблице порядковый номер. Казалось бы, куда проще. Для этого я использую выражение "RowNo(Total)". В таблице  присутствуют нулевые строки, которые я убираю из таблиц (suppress missing), но они все равно учитываются при выставлении номера строки. Номера строки могут идти так: 1 2 4 5 6 7 8 9 10 11 13. Подскажите, пожалуйста, как сделать нормальную нумерацию, где каждой строчке, которую видно в таблице присваивается свой номер?

Вопрос для двух типов графиков: пивот и прямая таблица.

В прямой можно использовать выражение: =1 с включенным режимом аккумуляции, но при нескольких переменных в измерениях это не работает.

Спасибо!

С уважением,

Журавлёв Леонид.

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

does this work for you?

=Rank(-if(Rangesum(sum([Column 1]),sum([Column 2]),sum([Column 3]))>1,ID))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

9 Replies
vinieme12
Champion III
Champion III

Rowno() is an interrecord function

Inter-Record Functions

Can you post a sample , it's easier to assist that way.

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
zhuravlevleonid
Contributor II
Contributor II
Author

Posting an example. Have a look at row number.

thank you!

vinieme12
Champion III
Champion III

does this work for you?

=Rank(-if(Rangesum(sum([Column 1]),sum([Column 2]),sum([Column 3]))>1,ID))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

Check attached sample, look at the Dimension

=AGGR( if(rangesum(sum([Column 1]),sum([Column 2]),sum([Column 3]))>=1,ID),ID)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
zhuravlevleonid
Contributor II
Contributor II
Author

Seems like!

Thanks a lot!

zhuravlevleonid
Contributor II
Contributor II
Author

Rank function worked well! Thank you!

nice hint btw!

vinieme12
Champion III
Champion III

just posted an app, check that as well, you just need to move the conditions to the calculated dimension

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
zhuravlevleonid
Contributor II
Contributor II
Author

Well. I have just faced with next challenge.

Rank works only on distinct values. In my example all ID's was unique. Is there any possibility to rank non-unique field?

For example if ID's was like that:

ID:

A

A

A

B

B

C
C

C

I want to wirte a row numbers from 1 to 8

vinieme12
Champion III
Champion III

Hi, I posted an updated app above, it uses Rowno(TOTAL) and a calculated dimension

attaching again for reference

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.