Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, guys. I hope you can help me
I need exactly to assign a number to the value of the field Team Name between 1 and 8, but not repeat a already number assigned
Teams:
LOAD * INLINE [
TeamName
Mexico
Brazil
Colombia
France
USA
Argentina
Peru
Spain];
Example Result:
Thank's
May be:
In Expressions: Rank(Only(TeamName),7) - Label - Rank
In Script:
Teams:
LOAD * INLINE [
TeamName
Mexico
Brazil
Colombia
France
USA
Argentina
Peru
Spain];
FinalTable:
LOAD *,
If(TeamName <> Previous('TeamName'), RangeSum(Peek('Rank'), 1), 1) as Rank
Resident Table
Order By TeamName desc;
DROP Table Teams;
Hi
take a look at function Autonumber() it's made for this :
Autonumber(TeamName)
regards
Only thing is, it would not be random, but sequential.
you are right,
so :
LOAD *, rand() as rand FROM 'your table'
load *, autonumber(rand) as nb resident 'your table' order by rand;
that changes on each load
This is a way to get a randomly picked list of teams: