Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Contributor
Contributor

Re: help - performance improvements

How do you feel about this approach?

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