Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Congratulations to the new Qlik Luminary and Partner Ambassador class! Meet them here
cancel
Showing results for 
Search instead for 
Did you mean: 
Rafakla
Contributor
Contributor

Set Analysis in include.qvs file

Hi all,

How can I use the expression bellow in  include.qvs file?

SET vLast12Months = Sum ({<[Ano Mes Retorno] = {">=$(=date(Max(addmonths(today(),-12)),'YYYYMM'))"}>}[Valor Realizado Cob - Coop]);

When executed, the variable vLast12Months appears like this in the .qvw file:

"Sum ({<[Ano Mes Retorno] = {">="}>}[Valor Realizado Cob - Coop])"

Thanks

Rafael

Labels (2)
2 Replies
andrzejdobiegal
Partner - Contributor II
Partner - Contributor II

To avoid expanding the $(..) use a different character first '#' and replace it later '$', see below:

andrzejdobiegal_0-1782996568032.png

 

andrzejdobiegal
Partner - Contributor II
Partner - Contributor II

you can also put the expressions into a  table and create the corresponding variables from the table fields, see below:

andrzejdobiegal_1-1782997486553.png