Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
simonaubert
Partner - Specialist II
Partner - Specialist II

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
ngioux
Partner - Contributor II
Partner - Contributor II

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
ngioux
Partner - Contributor II
Partner - Contributor II

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

simonaubert
Partner - Specialist II
Partner - Specialist II
Author

Hello,

Thanks, exactly what I feared.

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision