Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
noman212
Creator III
Creator III

Serial Number on Dimension

Hi Friends,

How can i add Serial number based on multiple dimension.

i want to do this on calculated dimension bases in a pivot table.

Awaiting your reply.

Regards

Noman khan

13 Replies
noman212
Creator III
Creator III
Author

1 - How can i placed Expression in Column no 1 in pivot table?

2 - =Rowno(Total) gives serial 1 to N  number of SKU.

But, i want it on Brand wise like Brand ABD has 5 SKU so serial no of brand's ABD SKU is 1,2,3,4,5

BRAND XYZ has 2 SKU so serial no of brand's XYZ  SKU is 1,2. and so on....

Kushal_Chawda

So try it in script Like below

Data:

LOAD Brand,

          SKU

FROM Table.qvd(qvd);

New:

noconcatenate

LOAD *,

          if(rowno()=1 or Brand<>Previous(Brand),1,

          if(Brand = previous(Brand) , peek('Rank')+1) as Rank

resident Data

order by Brand,SKU;

drop table Data;

sunny_talwar

Using the sample attached by joshua‌ (Thanks)

For dimension, you can also use this:

=Aggr(RowNo(), sku)

Right now the RowNo() will be assigned based on load order of sku, but if you are using QV12 and would want to sort sku in a particular order you can sort the sku within the Aggr() function

The sortable Aggr function is finally here!

Capture.PNG