Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rzenere_avvale
Partner - Specialist II
Partner - Specialist II

Set analysis, straight tables and expressions

Hi everyone,

I have three straight tables with the same expressions. The tables are different between them because on everyone I used a different parameter in the single expressions (so table1 will have parameter vParameter1, table2 will have vParameter2, table3 will have vParameter3).

Currently I set the parameters into the set analysis manually, but I would like to add another expression in the tables (e.g. let's call it "Parameter") where I set only the relative parameter for that table (vParameter1/vParameter2/vParameter3) and then in the expression below I call only the said column. This would be really helpful to me in order to maintain the code

It works when I call the expression "Parameter" normally, but I'm unable to do it into the set analysis... It there a way to do this?

1 Solution

Accepted Solutions
MarcoWedel

Hi,

instead of defining the vParameter variable in an additional "Parameter" expression, you could use parameterized variables as your expressions like:

SET vSold = Sum({$<articolParameter={'$1'}>}articolPrice);

QlikCommunity_Thread_186268_Pic2.JPG

or

LET vSold2 = 'Sum({$<articolParameter={'''&Chr(36)&'($1)''}>}articolPrice)';

QlikCommunity_Thread_186268_Pic1.JPG

hope this helps

regards

Marco

View solution in original post

5 Replies
MarcoWedel

‌please post sample application.

thanks

regards

Marco

rzenere_avvale
Partner - Specialist II
Partner - Specialist II
Author

Hi Marco,

hope this helps even if it's a basic example. In my real environment table1, table2 and table3 have many more expressions.

Where I would like to arrive is similar to tableX (which currently doesn't work, of course): defining a new expression (labeled "Parameter" in tableX) I would like to be able to call this expression within the set analysis into the same straight table in order to achieve that the code in the three tables is always the same, except for the value of that single expression "Parameter" (so, ideally, I can set variables for the expressions and manage only once the code instead of three times like now).

Hope this is clear (and possible too),

Riccardo

MarcoWedel

Hi,

instead of defining the vParameter variable in an additional "Parameter" expression, you could use parameterized variables as your expressions like:

SET vSold = Sum({$<articolParameter={'$1'}>}articolPrice);

QlikCommunity_Thread_186268_Pic2.JPG

or

LET vSold2 = 'Sum({$<articolParameter={'''&Chr(36)&'($1)''}>}articolPrice)';

QlikCommunity_Thread_186268_Pic1.JPG

hope this helps

regards

Marco

rzenere_avvale
Partner - Specialist II
Partner - Specialist II
Author

Nice solution, didn't thought to do it this way but is much better than it is right now... Thank you!

MarcoWedel

‌you're welcome.

Glad I could help.

regards

Marco