Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
souadouert
Specialist
Specialist

set analsis with variable

I download the expression set from a file, I have a problem with some expression when I use the variable always the result zero if I put the expression the result is correct


9 Replies
vinieme12
Champion III
Champion III

try adding an equal sign "="

$(=variable)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
pradosh_thakur
Master II
Master II

Try adding an extra = in variable or us an extra = inside dollar expansion

The Little Equals Sign

Learning never stops.
prma7799
Master III
Master III

sunny_talwar

Are you just using your variable like this

vVar? Try adding a dollar sign expansion and see if that works

$(vVar)

souadouert
Specialist
Specialist
Author

even with =

souadouert
Specialist
Specialist
Author

even with =

prma7799
Master III
Master III

Please share sample app.

Anil_Babu_Samineni

Can you share the variable definition you are working with?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
souadouert
Specialist
Specialist
Author

Indicateur:

LOAD Référence as Référence_Ind ,

     Indicateurs AS Indicateurs_Desc

FROM

[..\REF_IND\Spécification Base de données Pilotage Opérationnel.xlsx]

(ooxml, embedded labels, header is 1 lines, table is [Référentiel Indicateur]);

//LIST EXPRESSION

Expression_list:


LOAD RowNo() as REF_Exp,

     Référence as Référence_Ind,

     

     Indicateurs,

     replace(Indicateurs,' ','') & replace(REF_Expression,' ','')  as desc_expression,

     Segment,

     Expression

FROM

[..\REF_IND\Spécification Base de données Pilotage Opérationnel.xlsx]

(ooxml, embedded labels, table is REF_Expression);


LET myCount = peek('REF_Exp',-1,[Expression_list]);


FOR _i = 0 to $(myCount);

   LET _varName = Peek('desc_expression',$(_i),[Expression_list]);

   LET _varValue = Peek('Expression',$(_i),[Expression_list]);

  

   //Now create the variables

   SET [$(_varName)] = $(_varValue);

NEXT _i;

//LIST_ENTITY: