Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
bxprokop
Contributor II
Contributor II

Autonumber() No Duplicates

I am trying to use Autonumber() to generate a number for Cost and Customer.  I have sorted already sorted in the order needed but I do not want the Autonumber to repeat when multiple Customers have the same cost.  How do I end up with an Autogenerated Number equal to the number of rows with no duplicates when the cost is the same.  Example: If I have 4000 rows  I want my ending AutoNumber to be 4000 not 3500 with duplicates.  Hopefully, that makes sense.  Any help will be greatly appreciated.

Labels (1)
1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

Use RowNo() instead.

 

Load *, RowNo() as Row,
AUTONUMBER(Status) as Row1;
LOAD * INLINE [
Status, Data
a, 2
a, 2
b, 3
c, 4
a, 6
a, 2
];

View solution in original post

1 Reply
Frank_Hartmann
Master II
Master II

Use RowNo() instead.

 

Load *, RowNo() as Row,
AUTONUMBER(Status) as Row1;
LOAD * INLINE [
Status, Data
a, 2
a, 2
b, 3
c, 4
a, 6
a, 2
];