Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Not applicable

Re: help - performance improvements

Hi there,

I've had that problem as well. Use strings and evaluate the result works fine as a workaround when using CPU costly expressions. Ex:

If(a=1,

     <expression 1>,

If(a=2,

     <expression 2>,

If(a=3,

     <expression 3>,

//else

     <expression 4>

)))

you may convert every single expression to its string equivalent and $ at the end:

$(=

If(a=1,

     <stringified expression 1>,

If(a=2,

     <stringified expression 2>,

If(a=3,

     <stringified expression 3>,

//else

     <stringified expression 4>

)))

)

What you win: Only evaluate four strings (instead of four costly expressions) and only one costly expression instead of four.

Highlighted
New Contributor

Re: help - performance improvements

How do you feel about this approach?

https://www.infinityinsight.com/blog/?p=284