Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Partner
Partner

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

Tags (2)
1 Solution

Accepted Solutions
Partner
Partner

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

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

2 Replies
robin_hausdoerfer
Valued Contributor III

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

you could try a variable with parameters...

Variables with Parameters

Partner
Partner

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

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