Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to create the "order line" field like at 2. table
for each order id create row number that group by his order id.
How can i do that.
thank's
1.
order id |
---|
1 |
2 |
3 |
2.
order id | order line |
---|---|
1 | 1.1 |
1 | 1.2 |
1 | 1.3 |
2 | 2.1 |
2 | 2.2 |
May be like this
LOAD [order id],
[order id] & '.' & AutoNumber(RowNo(), [order id]) as [order line]
FROM ...
thanks,
But the loading a takes a very long time
The other option is this
LOAD [order id],
[order id] & '.' & Rank as [order line];
LOAD [order id],
If([order id] = Previous([order id]), RangeSum(Peek('Rank'), 1), 1) as Rank
FROM ...