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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Venkata_Sivaji1
Contributor
Contributor

Need to generate surrogate key from starting when ever group ends

Team,

I have input as below.

2016-10-01|1243.5

2016-10-01|1106.8

2017-11-01|12309.0

2017-11-01|13467.9

 

Output need as :-

date|sales|key_value

2016-10-01|1243.5|1

2016-10-01|1106.8|2

2017-11-01|12309.0|1

2017-11-01|13467.9|2

when ever date change happen, we need to create key from starting.

 

can some advice how to do it in tmap and tjavarow by using custom coding

Thanks In Advance!

 

 

Labels (3)
1 Reply
Anonymous
Not applicable

Hi
You can call built-in function Numeric.sequence("s1",1,1) to generate a sequence number for each date, eg:
Numeric.sequence(row1.DateColumnWithStringtype,1,1)