Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community!
I am trying to create expression for generate Row numbers in the straight table but without using RowNo() function.
I have tryed to write expression like this:
RangeSum(1,Above(Rows))
But I need generate Rows values only for first fives rows in the table (P1 - P5) and for others rows it's should be Null values in the Rows expression.
Could somebody help me resolve this issue?
Hi Dzmitry,
For load order you have to set a RowNo or RecNo on script, if your order will set by a value, then use this value.
For load order:
Ascendent: IF(Rank(Total Min(-Num(PositionLoad)))<=5,Rank(Total Min(-Num(PositionLoad))))
Descendent: IF(Rank(Total Min(Num(PositionLoad)))<=5,Rank(Total Min(Num(PositionLoad))))
For calculated value:
Ascendet: IF(Rank(Total Sum(-Value))<=5,Rank(Total Sum(-Value)))
Descencet: IF(Rank(Total Sum(Value))<=5,Rank(Total Sum(Value)))
Regards.
Hi,
Will P1 always be 1, P2 always 2 etc or could that change?
No, I can select P3-P8 and P3 should have 1, P4 -2 etc like RowNo() function.
Hi Dzmitry,
Try this:
IF(Rank(Total Min(-Num(Purgechar(Product,'P'))))<=5,Rank(Total Min(-Num(Purgechar(Product,'P')))))
Regards
I do not know r you facing an issue or you doing an R&D to find another way of doing it.
try this -
If(rowno()<=5,rangesum(Above([Rows]),1),'-')
Not the most elegant hack, but it works. This one uses a dummy hidden expression (RowActive)
Best,
Peter
Or you can try below expression,
If(Isnull(Above(Rows)),1,If(Above(Rows)+1<=5, Above(Rows)+1,'-'))
Nice one, faking Null values
It might be work.
if(RowNo()<6,RangeSum(1,Above(Rows)))