Previous row Number error when sorting number above 10

i have built adoc which i use previous row to get my calculation from previous row
i have column name items and columns name pay number
i sort table by items and pay numbers
formula works when pay number less than 10
and get wrong sort when number more than 10
formula
thisTable.Filter(Items=thisRow.Items)

.Sort(false(),thisTable.[Pay No]) .

Filter((Concatenate(Items,[Pay No] )<=
Concatenate( thisRow.Items,thisRow.[Pay No]))
&&[Row ID]!=thisRow.[Row ID] ).
[Row ID].First()

screenshot



my doc

my table

hi @Mohamed_Elrefae ,
you may benefit from this blog, it shows how to use filters to get a preceding value. it also references blogs discussing other approaches.

I hope it helps, cheers, christiaan

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.