Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

Derive and ApplyMap : is it supposed to work?

Hello all,

I want to use a derived field with an applymap. It seems pretty easy but it does not work :

Here is my script

 

Load_Mapping_etat: //code et libellé états
Mapping LOAD
    etat_code,
    etat_libelle
FROM [$(vG.ExtractPath)EXCEL/Mapping_etat.qvd]
(qvd);


evenement:
LOAD
	evenement_numero_ordre,
    etat_precedent_code,
    etat_suivant_code,
    etat_code
FROM [lib://PROJECT/Path/1.QVD/3.Load/TFA_Evenement.qvd]
(qvd);


[ ]: 
  DECLARE FIELD DEFINITION Tagged ('$etat')
FIELDS
  $1 AS [_code_derived] Tagged ('$etat', '$libelle'),
  Applymap('Load_Mapping_etat', $1,null()) AS [_libelle]
 ;
//$1
DERIVE FIELDS FROM FIELDS [etat_code], [etat_suivant_code], [etat_precedent_code] USING [ ] ;

 


The script executes

 

Load_Mapping_etat << Mapping_etat
Lignes extraites : 12
evenement << TFA_Evenement
(QVD (en lignes) optimisé)
Lignes extraites : 2 770 245
Création de l'index de recherche
L'index de recherche a bien été créé.

 



The fields are even created :

 

image.png

However, the second field is broken : 


image.png

Any ideas ?
Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision
Labels (2)
1 Solution

Accepted Solutions
Partner
Partner

Hello Simon,

 

I think this behavior is totally normal:

The derived fields are virtual fields calculated at each selection in the visualization (https://community.qlik.com/t5/Qlik-Sense-Documents-Videos/Derived-Calendar-Fields/tac-p/1485686).

The mapping tables are temporary tables that are automatically deleted by Qlik at the end of the script, so it can't be use after the reload is done.

 

Hope this helps you.

Best regards,

Nicolas

View solution in original post

2 Replies
Partner
Partner

Hello Simon,

 

I think this behavior is totally normal:

The derived fields are virtual fields calculated at each selection in the visualization (https://community.qlik.com/t5/Qlik-Sense-Documents-Videos/Derived-Calendar-Fields/tac-p/1485686).

The mapping tables are temporary tables that are automatically deleted by Qlik at the end of the script, so it can't be use after the reload is done.

 

Hope this helps you.

Best regards,

Nicolas

View solution in original post

Partner
Partner

Hello,

Thanks, exactly what I feared.

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision