Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save $300 - Register for QlikWorld (formerly Qonnections) by January 31st: Learn More
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

Re: Derive and ApplyMap : is it supposed to work?

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

Re: Derive and ApplyMap : is it supposed to work?

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

Re: Derive and ApplyMap : is it supposed to work?

Hello,

Thanks, exactly what I feared.

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision