Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

souadouert
Contributor III

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
Esteemed Contributor II

Re: set analsis with variable

try adding an equal sign "="

$(=variable)

pradosh_thakur
Valued Contributor III

Re: set analsis with variable

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

The Little Equals Sign

prma7799
Honored Contributor III

Re: set analsis with variable

Re: set analsis with variable

Are you just using your variable like this

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

$(vVar)

souadouert
Contributor III

Re: set analsis with variable

even with =

souadouert
Contributor III

Re: set analsis with variable

even with =

prma7799
Honored Contributor III

Re: set analsis with variable

Please share sample app.

Re: set analsis with variable

Can you share the variable definition you are working with?

souadouert
Contributor III

Re: set analsis with variable

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:

Community Browser