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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikBeginner1
Creator
Creator

Missing Records

Hello,

I have an app which is a report comparing two different source systems and the GWP for each source system based off a number of dimensions.

One of the source systems assigns Policy Numbers in sequence.  Any gaps in range may indicate something has been missed.  How can I produce a table which essentially the missing numbers to indicate if there is a missing number? For example 

PC00002, PC00003, PC00004, PC00006. There would be a table which has a header of 'Missing Policies' and to show PC00005.  From PC00001 to the Max of the PolicyNumbers where the Source System = 'Acturis'. 

I hope I am making sense, any help would be greatly appreciated. 

Kind regards,

Labels (2)
1 Reply
QFabian
MVP
MVP

Hi @QlikBeginner1 , check this please :

 

Data:
Load * inline [
Record
PC00002
PC00003
PC00004
PC00006
];

Record:
Load
*,
1 as Exists
Resident Data;

 

//Let vMin = PurgeChar(peek('Record',0,'Record'),'PC');
Let vMax = PurgeChar(peek('Record',NoOfRows('Record')-1,'Record'),'PC');


Load
'PC' & num(recno(),'00000') as Record,
0 as Exists
autogenerate ($(vMax))
Where not exists(Record,'PC' & num(recno(),'00000') );

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.