Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to create a count for each time a a value is repeated in a column, with +1 for each new value. The below works to bring back a count (1, 2, 3 etc) for each time an item is repeated. Is there an easier way to do this?
RowNo() as XRow,
if(ColumnX= Peek('ColumnX'), Peek('ColumnXCTMP')+1,1)as ColumnXCTMP,
if(ColumnX = Peek('ColumnX'), Peek('ColumnXCTMP')+1,1)&ColumnX as ColumnX2
Does these statements throws any error?
May be like this
LOAD Field,Autonumber(RowNo(),Count) as Count;
LOAD *,RowNo() as xRow,AutoNumber(Field) as Count Inline [
Field
1
1
1
2
3
4
6
7
2
1
3
4
5
];
Regards,
Antonio
I believe RowNo() as XRow and RecNo() as RecNum is also ok in this case.
Hi Anand,
I have just tried this and it works perfectly - is there a way to add to an existing script for a column without load statements? For an existing column in the script with an expression as a count column?