This field is required.
Only these extensions are allowed(.jpg, .JPG, .jpeg, .JPEG, .gif, .GIF, .png, .PNG)
Tags cannot contain the characters ' /, \\, #, ?, or ; >,< '
Only these extensions are allowed(.zip,.ZIP,.pdf,.PDF,.qvf,.QVF,.qvw,.QVW)
If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
I have some data like below
Any idea how I would go about assigning the row numbers like the above example? I have played about with the Autonumber function but I cannot figure this one out!
The type Master is always 0 and then the others I would like to autonumber.
Hoping this would help
rowno() and recno()
Counters in the Load
Sorry, they didn't really tell me how to do it..
Create a new column In your table load as follows
RowNo() as Row_Number
Coming to the difference RecNo() counts the records in the source and ignores any 'where' clauses if applicable.
RowNo() assigns row numbers after the table is loaded into Qlikview.
Actually both the links you got tell you exactly how to do it... Didn't you bother to read any of them?
Try below code. Replace <DataSource> with your datasource details.
If(Type= 'Master',0,Peek('RecNO')+1) as RecNO ;
FROM <DataSource> ;
Hi. Sorry I tried this code but it didn't work.. All i did was put an increment by 1 for every row where i want it to reset back to zero (as per my sample above).
Hi Vamsee. I've tried to get my head around this but I'm still not sure what you mean. Are you able to use my sample data above and see show me what you mean?
If I got it right you want to assign row numbers for the records where your type is not master.
B: NoConcatenate Load *, RowNo() as Row_Number Resident A Where Type<>'Master'; Concatenate(B) Load *, 0 as Row_Number Resident A Where Type='Master'; DROP Table A;
Unfortunately no. I want the sort order to reset back to zero when its a master. Like in my example so if you have a master job then it is zero. The proceeding legs would then be auto numbered.
Does that make sense?
I really appreciate your help so far