Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
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?

Thanks,

Steve

1 Reply
hic
Former Employee
Former Employee

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).

HIC