Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HELLO,
I still have problems with the expression set download from a file, the expression gives the right result using direct in a table,
but when I download it since file does not work, I removed the $ and used TOTAL, and nothing has changed
You can look here for ways to stop dollar sign expansion in the script
Re: Stop Dollar Sign Expansion in the script (Escape Character ??? )
Avoid Dollar sign expansion when reloading | Qlik Community
I NEEDTHIS EWPRESSIONsum(TOTAL{<ANNEE = {$(=Max(ANNEE))}, MOIS, MOIS = {"<= $(=MAX(MOIS))"} , DATE_SITUATION,CREDIT_NATURE={"CONSO"},CLIENT_PRE_SEGMENT_A={"CLASSE MOYENNE"}>} CREDIT_MONTANT_PRODUCTION )
Hello sunny ,
the first ligne is the variable second ligne is the expression
Result
excel file:
Script:
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;
for example Anil this expression
COUNT({< CLIENT_ENTREE={"CONQUETE"},CLIENT_PRE_SOUS_SEGMENT_A,CLIENT_PRE_SOUS_SEGMENT_A,CLIENT_PRE_SOUS_SEGMENT_A={"2 CM - ÉPARGNANT"}>}CLE)
worked without problem
I know and the problem is that while executing the script, the dollar sign expansion is getting evaluated causing it to come as null. The above posted threads have provided some alternative ways of doing it
So, If you want to use this variable [$(_varName)] in set analysis. I believe this won'r work because Peek() only for Script not UI where i am thinking.
I tried &chr(36) & as you look in screen
Would you be able to share your Excel file with just this one variable which is causing problems
also when i used & '$' &
ok sunny 2minutes
make sure you dont have space between " and <= that can cause the sum to be evaluate to zero