Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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... ?
I need to do this outside of the load script, although i thank you for your time
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.
hi wallerjc
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 Mohit Sahrma is
also well.
Regards