Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Creating new field to mark each record

Hi, 

I need to mark each record based on CID, New_Site and Weekingdate. 

Script

LOAD


CID,

New_Site,
Weekending,

from ...

CID contains unique data, New_Site and Weekending are not. 

CIDNew_SiteWeekending
CRS6CI00143608DST26/07/2020
CRS6CI00143914Devonport26/07/2020
CRS6CI00143998Edinburgh26/07/2020
CRS6CI00143564Cavendish Nuclear (SAP)26/07/2020
CRS6CI00143554Edinburgh26/07/2020
CRS6CI00143762Devonport26/07/2020
CRS6CI00143780DST26/07/2020
CRS6CI00144028Rosyth26/07/2020
CRS6CI00144030Rosyth26/07/2020
CRS6CI00144024Edinburgh26/07/2020
CRS6CI00143636Edinburgh26/07/2020
CRS6CI00143652Skills & Learning26/07/2020
CRS6CI00143991Devonport26/07/2020
CRS6CI00143665Devonport26/07/2020
CRS6CI00143642Devonport26/07/2020
CRS6CI00143778Devonport26/07/2020
CRS6CI00143719D & S26/07/2020
CRS6CI00143586Cavendish Nuclear (SAP)26/07/2020
CRS6CI00143886Devonport26/07/2020
CRS6CI00143670Cavendish Nuclear (SAP)26/07/2020

 

This is the data set in am loading and i need to mark each CID with the rolling number so example

CIDNew_SiteWeekendingRolling No
CRS6CI00143564Cavendish Nuclear (SAP)26/07/20201
CRS6CI00143586Cavendish Nuclear (SAP)26/07/20202
CRS6CI00143670Cavendish Nuclear (SAP)26/07/20203
CRS6CI00143719D & S26/07/20201
CRS6CI00143914Devonport26/07/20201
CRS6CI00143762Devonport26/07/20202
CRS6CI00143991Devonport26/07/20203
CRS6CI00143665Devonport26/07/20204
CRS6CI00143642Devonport26/07/20205
CRS6CI00143778Devonport26/07/20206
CRS6CI00143886Devonport26/07/20207
CRS6CI00143608DST26/07/20201
CRS6CI00143780DST26/07/20202
CRS6CI00143998Edinburgh26/07/20201
CRS6CI00143554Edinburgh26/07/20202
CRS6CI00144024Edinburgh26/07/20203
CRS6CI00143636Edinburgh26/07/20204
CRS6CI00144028Rosyth26/07/20201
CRS6CI00144030Rosyth26/07/20202
CRS6CI00143652Skills & Learning26/07/20201

 

Thanks

 

Labels (1)
2 Solutions

Accepted Solutions
Highlighted
MVP
MVP

Try like:

Autonumber(CID, New_Site) as RollingNo

View solution in original post

Highlighted
Creator
Creator

Thanks, 

It worked perfect. i changed it to 

Autonumber( CID,New_Site& Weekending) as RollingNo

and i now see the grouping

BBGrpControlWeekendingNew_SiteCount(CID)
   371
BBG126/07/2020Cavendish Nuclear (SAP)50
BBG226/07/2020Cavendish Nuclear (SAP)50
BBG326/07/2020Cavendish Nuclear (SAP)50
BBG426/07/2020Cavendish Nuclear (SAP)50
BBG526/07/2020Cavendish Nuclear (SAP)50
BBG626/07/2020Cavendish Nuclear (SAP)50
BBG726/07/2020Cavendish Nuclear (SAP)50
BBG826/07/2020Cavendish Nuclear (SAP)21

 

as it created and group for every 50 records. 

thank you for all your help. 

vijay

View solution in original post

2 Replies
Highlighted
MVP
MVP

Try like:

Autonumber(CID, New_Site) as RollingNo

View solution in original post

Highlighted
Creator
Creator

Thanks, 

It worked perfect. i changed it to 

Autonumber( CID,New_Site& Weekending) as RollingNo

and i now see the grouping

BBGrpControlWeekendingNew_SiteCount(CID)
   371
BBG126/07/2020Cavendish Nuclear (SAP)50
BBG226/07/2020Cavendish Nuclear (SAP)50
BBG326/07/2020Cavendish Nuclear (SAP)50
BBG426/07/2020Cavendish Nuclear (SAP)50
BBG526/07/2020Cavendish Nuclear (SAP)50
BBG626/07/2020Cavendish Nuclear (SAP)50
BBG726/07/2020Cavendish Nuclear (SAP)50
BBG826/07/2020Cavendish Nuclear (SAP)21

 

as it created and group for every 50 records. 

thank you for all your help. 

vijay

View solution in original post