Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two column of data, which are "Customer ID" and "Transaction Amount".
And we decide to divided those customer into 10% group (it should be 2 customers each group for this sample data) by ranking their transaction amount.
Should we have any methods to divided those customer into the follow result:
Hi,
maybe this
Table:
LOAD * Inline [
Customer,Amount
1,1500
2,1400
3,1300
4,1200
5,1100
6,100
7,900
8,800
9,700
10,600
11,500
12,400
13,300
14,200
15,100
16,100
17,100
18,100
19,100
20,100
21,100
];
Let vNr=Floor(NoOfRows('Table')*0.1);
Left Join
LOAD Customer,Autonumber(Floor(Rowno()-1,$(vNr))) as Group
Resident Table;
Regards,
Antonio
Hi,
maybe this
Table:
LOAD * Inline [
Customer,Amount
1,1500
2,1400
3,1300
4,1200
5,1100
6,100
7,900
8,800
9,700
10,600
11,500
12,400
13,300
14,200
15,100
16,100
17,100
18,100
19,100
20,100
21,100
];
Let vNr=Floor(NoOfRows('Table')*0.1);
Left Join
LOAD Customer,Autonumber(Floor(Rowno()-1,$(vNr))) as Group
Resident Table;
Regards,
Antonio
Dear Antonio,
Thanks for your suggestion, it is workable.