Discussion Board for collaboration on QlikView Layout & Visualizations.
I want a key, that will be generate from the first and second column.it is important that "Col2" has the order 1,2,3,4,1,2,3,4.The first four values are "Key_1" and the last four values from the "Col2" are "Key_2".How can i generate the key with the previous or peek function?has anyone an idea?
This should work if I understand what you want correctly:
LOAD *, 'Key_' & Counter as GeneratedKey;
LOAD *, if(previous(Col2)>Col2,rangesum(1,peek(Counter)),rangemax(1,peek(Counter))) as Counter;
LOAD * INLINE [
Sample, Col2, GenerateKey , Value
A, 2 ,Key_1,20
A, 3 ,Key_1,15
A, 4 ,Key_1,30
A, 3 ,Key_2,40
A, 4 ,Key_2,50
Compare GeneratedKey with your field GenerateKey
View solution in original post
Wow, thank you!