Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
joybratas1
Contributor II
Contributor II

Class range with if condition and multiple 'and' is making the charts slow

Hi, 

I have multiple charts that are affected by multiple sliders. 

For achieving that in dimension I used something like-

class(if(slider1< 'max value  of the slider' and slider1> 'min value' and slider2<'max value' slider2>'min value' and slider3<'max value' and slider3>'min value', Field) 

Similarly in measure count(if (slider1<'max value' and slider1>'min value'...... , field2) ) 

So this sort of if condition expressipn is used for multiple charts and kpis in the dashboard. 

So everytime some slider value is changed or any selection made it gets slower. Is there a way I can improve the performance. I have removed all strings and used just flags, removed all unused columns. 

The similar expressions are repeated in all the charts and kpi's so everytime it is calculating. I believe this is the bottleneck, but I am not sure how to fix it. 

 

Any help is appreciated. 

 

Labels (1)
1 Reply
marcus_sommer

I suggest to change the (nested) if-loops to set analysis statements like:

count({< Field1 = {">=slider1<=slider2"}>} Field2)

- Marcus