Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Efficiency of variables vs repeating expressions

Noob question here...

If I have multiple sheets/charts that use a common expression, is it more efficient to assign that expression to a variable and then reference the variable in the various sheets/charts than to have the expression repeated over and over in each object?

For example if I need to plot:

sum(bad_call)/sum(call_count)  vs sum(good_call)/sum(call_count)

would it be better to create vCallCount =sum(call_count) and then plot

sum(bad_call)/vCallCount vs sum(good_call)/vCallCount.     

Or is QlikView smart enough to recognize multiple instances of sum(call_count) and calculate it once?



1 Reply

It is easier to maintain if you use a variable. But that is the only advantage, because QlikView is smart enough - in both cases - to recognize multiple instances of the expression. The result will be saved in the cache and re-used for the other instances the same expression. (Given that the data scope is the same).