Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
dpmbrouwers
New Contributor II

Exclude records in loading script

Hi,

I could use some help here. I have a number of xlsx sheets, looking like the attached that represent the activities in our Operating Rooms (parts are blurred as they are privacy sensitive info). I’ve loaded these xlsx-sheets into one qvd.

From this qvd I want to load only the values that are related to patients and leave the rest of the additional info out. To be able to do this is I need to exclude a number of records, based on the following conditions:

  •  The records where the KAMER_(ID) is empty

And additionally

  • The records where GEBOORTEDATUM is “1-1-1900” (an alternatieve could be to choose the records where the PATIENTNUMMER is 31779759 or 11780611)

My basic load statements from the QVD are:

OK_programma:

LOAD

Datum,

Volgorde,

Kamer_ID,

Patiëntnummer,

Geboortedatum,

"Aangevraagde verrichtingen",

"Aangevraagde verrichtingen (oms.)",

Duur,

"Ingang operatiekamer",

"Uitgang OK",

"Opererende OE"

FROM [lib://Bron_QVD/OK programma.qvd]

(qvd);

I only started the scripting part of Qlik recently and I cannot get my head around this one. I’ve tried several things with If and where statements, but without succes. Help is appreciated!!

1 Solution

Accepted Solutions
Partner
Partner

Re: Exclude records in loading script

What if you put this after the first load:

 

example:

Load *

Resident OK_Programma

Where Len(Trim(KAMER_(ID))) > 0

OR not match (GEBOORTEDATUM, “1-1-1900”)

2 Replies
Partner
Partner

Re: Exclude records in loading script

What if you put this after the first load:

 

example:

Load *

Resident OK_Programma

Where Len(Trim(KAMER_(ID))) > 0

OR not match (GEBOORTEDATUM, “1-1-1900”)

dpmbrouwers
New Contributor II

Re: Exclude records in loading script

Thanks!

This was the solution I've been looking for. It didn't work at first, but that was due to some differences in upper and lower case.