Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 slaheddinekeyru
		
			slaheddinekeyru
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Community,
I'm using the RowNo() function when loading a table in my script.
I need the TOTAL qualifier to create a RowNo by field block. So I have to write this
test1:
LOAD
*,
RecNo(),
RowNo(TOTAL<Group>) as Rowno
Resident test
;
But it's not working.
I will be very gratefull if you have any idea.
Thank you very much for reading my discussion.
SME.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be try this
AutoNumber(RowNo(), Group) as RowNoByGroup
or this
If(Group = Previous(Group), RangeSum(Peek('RowNoByGroup'), 1), 1) as RowNoByGroup
In both cases, make sure that your data is correctly sorted (if it is not already sorted) by using a resident load with order by clause
 shraddha_g
		
			shraddha_g
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can you elaborate more with sample data and expected output?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be try this
AutoNumber(RowNo(), Group) as RowNoByGroup
or this
If(Group = Previous(Group), RangeSum(Peek('RowNoByGroup'), 1), 1) as RowNoByGroup
In both cases, make sure that your data is correctly sorted (if it is not already sorted) by using a resident load with order by clause
 slaheddinekeyru
		
			slaheddinekeyru
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you very much stalwar1
That's exactly what I'm looking for.
But I don't understand why we can't use the TOTAL qualifier with RowNo() ?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		TOTAL qualifier is not available in the script... this is by design...
