Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
ericdelaqua
Creator
Creator

Evaluate variable on Table

Evaluate dynamic variable on table using field values
 

Hello,

I am facing a challenge with evaluating variables on a Table. He is my load script.

Load * Inline[Text
text1
text2
text3
Text4
];  

 

Let text1= cadeau;
Let text2= 20;
Let text3= 1;
Let Text4= $(text2)+$(text3);

and on my output table I would like to have the following
Dimension
Text

Measure
'='&'''$'&'('&Text&')'''

sample output

TextValue
Textcadeau
Text20
Text1
Text21

 

Please any ideas how this can be archived? Thanks

1 Solution

Accepted Solutions
Taoufiq_Zarra

@ericdelaqua  why not adding mapping table

like this :

let text1= 'cadeau';
Let text2=20;
Let text3=1;
Let Text4= '$(text2)'+'$(text3)';

Map1:

mapping load * inline [
Text,value
text1,$(text1) 
text2,$(text2) 
text3,$(text3) 
Text4,$(Text4) 
];

Data:
Load *,applymap('Map1',Text) as Value Inline [
Text
text1
text2
text3
Text4
];

output:

Taoufiq_Zarra_0-1628514557988.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

@ericdelaqua  why not adding mapping table

like this :

let text1= 'cadeau';
Let text2=20;
Let text3=1;
Let Text4= '$(text2)'+'$(text3)';

Map1:

mapping load * inline [
Text,value
text1,$(text1) 
text2,$(text2) 
text3,$(text3) 
Text4,$(Text4) 
];

Data:
Load *,applymap('Map1',Text) as Value Inline [
Text
text1
text2
text3
Text4
];

output:

Taoufiq_Zarra_0-1628514557988.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
ericdelaqua
Creator
Creator
Author

@Taoufiq_Zarra 

 

Thanks for your suggestion I actually lost this question so I recreated it here and got an answer. I didn't realise it was kept. I will try your suggestion too. Thanks 

https://community.qlik.com/t5/New-to-Qlik-Sense/How-to-evaluate-value-in-variable/m-p/1827265/highli...