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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
j_nlucas
Partner - Contributor III
Partner - Contributor III

Set analysis in a variable, with dynamic field value in another variable

Hello,

I have an expression with Set Analysis, that's configured in a variable as follows:

vSA_Cond1 = [Snapshot Type] = {'Current','History','Year to Dec 2016/17'}; (No quotes) :

Sum({<vSA_Cond1>}amount)  This works just fine.

The problem now is to make the third value dynamic: 'Year to Dec 2016/17'

I have a second variable:

vYearToDec = 'Year to Dec $(vEntryYear_Previous)'   (Quotes)  --> This will return exactly Year to Dec 2016/17

Where vEntryYear_Previous = 2016/17  (calculated in the script)

This configuration is not working. It doesn't recognise the value in vYearToDec.

Any ideas?

Thank you

Joaquin

1 Solution

Accepted Solutions
j_nlucas
Partner - Contributor III
Partner - Contributor III
Author

Hello Robin,

Thank you for your suggestion. It's a good thing to have in the tool box definitely.

My approach is quite similar, since instead of using a parameter ($1) I was using a different variable. But the idea is the same.

I have fixed the problem by simply adding chr(39) before and after the variable vYearToDec, and that made the trick!

Joaquin

View solution in original post

2 Replies
Anonymous
Not applicable

you could try a variable with parameters...

Variables with Parameters

j_nlucas
Partner - Contributor III
Partner - Contributor III
Author

Hello Robin,

Thank you for your suggestion. It's a good thing to have in the tool box definitely.

My approach is quite similar, since instead of using a parameter ($1) I was using a different variable. But the idea is the same.

I have fixed the problem by simply adding chr(39) before and after the variable vYearToDec, and that made the trick!

Joaquin