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: 
brindlogcool
Creator III
Creator III

Passing Parameters to variables

Re: Parameterised variable as a string

I have looked at the post for passing parameters through variables.  I would like to understand how does it works in background and will it have any impact in the performance (increase or decrease) or it is used only for the easy maintenance.  Is there any limitations? I have tried searching community but not able to find any QlikView Documentation on this. It would be very helpful if somebody share some insights on this.

6 Replies
petter
Partner - Champion III
Partner - Champion III

Have you looked in the Qlikvew Reference Manual? Page 291 chapter 24.4 is about this.

brindlogcool
Creator III
Creator III
Author

Thanks Petter.

I did looked at the reference manual. It provides the ways of using it. I would like to understand the impact on the performance. And how many hops related to no of tables.  Is there any case study on this.

petter
Partner - Champion III
Partner - Champion III

$-sign expansion is usually the first thing that is done before the recalculation and it has relatively little impact on performance because the expansion happens not on a row level in a chart. The number of hops and tables has nothing to do with variables and parameter-passing. There is no "study" on it as far as I know. This is a rather simple thing that happens so there is not much to "study" except understanding the process. It is really just a form of text-substitution which can take parameters and if it starts with $(=  then it will also do an expression evaluation of what comes before the ending bracket ).

brindlogcool
Creator III
Creator III
Author

I think it is more than the substitution. Considering the Application size, No of expressions and the no of Variables. I might be wrong but would like look in to it. And would like to know more on using variables with parameters will improve the performance or not with comparison.

petter
Partner - Champion III
Partner - Champion III

Yes of course if you create tens of thousands or hundreds of thousands of variables it will eat memory - but I have never seen applications with more than a hundred variables. Using variables with parameters will not improve performance - but it will not reduce it significantly compared to what is spent performance wise on recalculating your data model in a real life production application.

petter
Partner - Champion III
Partner - Champion III

If you want to look into performance you should study the memory statistics of your QlikView applications. Rob Wunderlich's QlikView Document Analyzer is a very good QlikView application to peek into you applications inner workings.

Recipe for a Memory Statistics analysis

Performance of Conditional Aggregations

If you want to study first hand you could also make up a simple straight table with autogenerated data and try out different expressions with and without variables and variables with parameters. Then you could do your selections and each time save the memory statics to a file. After gathering several scenarios you can do your final analysis with QlikView and reading the CSV memory statistics file into your QlikView applications. That way you can draw your own conclusions and hopefully share them with all of us on the community.

I did something like that last week-end when I got curious about an answer that was giving to a question on this forum. I suggested two alternative expressions and another guy suggested a third expression. All three expressions computed the same correct values. That piqued my interest so I made a straight table and pivot table to test all three expressions and sat for almost an hour or two running through the scenarios. It was very interesting and it was a huge difference between the three in calculation speed - which I would never have guessed if I hadn't run the tests.