Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there any way I can reuse the aggr function especially it's virtual table?
Say for instance, below expression which i thought of re-using is part of almost all of my final expressions.
aggr(sum(A/B), Dim1)
Final Expressions:
aggr(sum(A/B), Dim1) - Sum(D)
aggr(sum(A/B), Dim1)/Sum(E)
aggr(sum(A/B), Dim1)*100
and many..
So by any chance I could reuse the virtual table created by one Aggr function to all of my final expressions?
Say your first expression: =aggr(sum(A/B), Dim1) and label it as 'AAA'
then you can refer this expression in following expressions like:
=AAA-Sum(D)
=AAA/Sum(E)
Or,
=Column(1)/Sum(D) // column(N), 'N' is the expression column position which you refer
Or, even you can define a variable for the expression and refer it wherever you need it.
Create a variable using your constant expression and use it
aggr(sum(A/B), Dim1)
Please refer to http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables
Thanks for the response..
I've read a post by Barry regarding labeling and using variable instead of
direct expression but he concluded saying neither of them posses attractive
performance benefit.
Currently Im in a situation where one of chart is taking almost 10 mins to
load, I've get of rid of it.
The more you use AGGR and such complex expressions in the UI, your UI performance would suffer. You can't hold the calculated values(apart from single value in a variable) in UI. Therefore, to get rid of it, you might have to contemplate on bringing some calculations in the script.