Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

RowNo() Help

Hi,

As an example, here is a base table

Name, Category

James, Top

Ben, Top

Harry, Med

Sophie, Med

Sally, Low

How would I create a straight table, which looks like the below:

Name, Category, expr1

James, Top, 1

Ben, Top, 1

Harry, Med, 2

Sophie, Med, 2

Sally, Low, 3

To summarise, I need to build an expression which "autonumbers" on the dimension "Category"

How could I do this?

13 Replies
Not applicable
Author

This solution works but isn't scalable at all, my actual data set has around 2,000 "Category's" do you have any further ideas? Perhaps this isn't possible... ?

Not applicable
Author

I need to do this outside of the load script, although i thank you for your time

Not applicable
Author

Ding ding ding, we have a winner!

I can't believe I didn't think to simply Aggr() the table, many thanks for your time and solution here.

James.

Not applicable
Author

hi

my last post fullfill your requirment. because this code

if(Previous(Category)=Category,peek(field),rangesum(1,peek(field))) as field


work on any number of records.


and expression posted by