Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Some time ago I read in a discussion that you can use variables that have pick and match functions to return calculations based on selections, and use this variables inside expressions. For instance:
Set vExpressions = Pick(Match(Calc, 'Orders', 'TotalCustomers'), SUM(Orders), Count(Customers))
If my field Calc has the value Orders, the expression returned will be SUM(Orders), or if Calc field has the value TotalCustomers it will return the expression used to calculate the total of customers.
So, I would like to know if this is a good practice, and how this type of expressions could affect the performance of the application, specially if I'm not working with just to but several (let say 15 or 20) possible selections.
There are other type of methods that can be used to achieve the same?
I would like to know your opinion.
Regards,
Karla
This post gives one opinion: Re: Expressions in Fields
It depends more on the expressions you put in the pick function then the number of expressions I reckon.
I don't know how you use the pick-match and the Calc field. Perhaps you can achieve the same with separate chart expressions that are shown/hidden at need. See these blog posts:
This post gives one opinion: Re: Expressions in Fields
It depends more on the expressions you put in the pick function then the number of expressions I reckon.
I don't know how you use the pick-match and the Calc field. Perhaps you can achieve the same with separate chart expressions that are shown/hidden at need. See these blog posts:
Thank you Gysbert,
According with the post, it doesn't affect too much how many expressions do you have, but the complexity of the each of them.
I'm just curious about how Qlik handle this type of functions. Does it first evaluate the pick-match and then evaluate the expression returned, or evaluates all the expressions inside the pick-match and then return the result.
Regards,