Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Poor Performance because of Nested If-Else

Hi All,

We have a requirement, in which we have to choose the Dimensions as per selection in MultiBox values.

PFA, the demo application, in which I have created two Text Objects, one is "DrillDown Value" which indicates the value of one dimension and "Even DrillDown Value" which indicates the second Dimension Value.

Both the expressions in the Text Object has Nested If-Else statements, because of which we are facing poor performance issues.

We have tried -

     1>     DrillDown Object, for DrillDown Value, but it fails, when there is a single value in the child, it directly moves to GrandChild Value.

     2>     We thought to have CASE statements in Script, but it may not be possible, as we want the value to come as per selection from User.

Could you please provide any workaround for both the expressions.

Thanks & Regards,

MK

4 Replies
mrossoit
Creator II
Creator II

Hi,

I don't know if this solution could be right for your case.

I suggest you to give to the user the possibility to chose the 2 dimensions he want to use changing the value of 2 different variables.

Check out the attachment.

Regards

MR

peter_turner
Partner - Specialist
Partner - Specialist

Hi MK,

Have you read the blog by Rob Wunderlich called 'how not to choose an expression'?

He explains how QV calculates IF statements and that it will calculate both possible outcomes of the IF even we think it shouldn't. He also shows how to code around this and it might help the performance of your app!

peter_turner
Partner - Specialist
Partner - Specialist

marcus_sommer

I think this could be helpful for you: https://community.qlik.com/message/723682#723682

- Marcus