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: 
Not applicable

How know what is missing?

Hi, I have a problem with it only works when I filter for a single case, and need it to work for many.

This is my code:


UserData:
Load codigo as UserCode;
SQL SELECT codigo
FROM datper;

left join (UserData)
LOAD usercod as UserCode,
tipo as TypeCode,
applymap('Mapa_Activida',tipo,'--Error Avisos Vacíos--') as TypeWarning,
fecha & '|' & tipo as cod_Date_Type
//where match(tipo,'10','04','12')
where match(tipo,'12')
;
SQL SELECT tipo, fecha, usercod, codigo FROM citas;

WarningsUserData:
LOAD *,
if(isnull(cod_Date_Type),'MISSING','OK') as Status
resident UserData where not exists(cod_Date_Type,UserCode);

drop table UserData;


Now, for example, if i indicate:
WHERE match (type, '10')
everything works, because I know that the TypeCode is missing is 10.

But, and here is where there is my problem, if i indicate:
WHERE match (type, '10', '04', '12')
how I can know the TypeCode what is missing? TypeCode = 10, or TypeCode = 04, or TypeCode = 12?

I only know something is missing but do not know how to find out what TypeCode. I can't select TypeCode because obviously it is missing.

Hope you can understand my problem and help me. It's something necesary because without it i can't continue developing this project.

Thanks!

1 Reply
maneshkhottcpl
Partner - Creator III
Partner - Creator III

Hi,

If u have the TYPE Code master data then i can find a solution for u.

Say . if u have type code master in table tab1 as field TPCode,

then u can use the exists function with where clause

e.g if u have another table Tab2 with TPCode2 in which u want to find the missing code.

then

A:

laod TPCode2 from Tab2;

B:

load TPCode from Tab1 where not exists (TPCode2,TPCode);

drop table A;

u will get missing Type code;

Good Luck.