Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
joybratas1
Contributor II
Contributor II

Expression with nested Loop creating performance issue.

Hi community, 

I am facing a latency issue with my App. I have a GeoAnalytics Area Map for getting historical weather data of States of different countries. 

I currently have 40M records. This has tremendously made my GeoMap slow even for a filter selection. 

 

I have used the following expression to calculate- 

=if(vMinMax='MAX' and vTemperature='TEMPERATURE' and vTem=1 ,Round(((max({< date_x ={">=$(vStartDate)<=$(vEndDate)"}>}value))-32)*0.5556),
if(vMinMax='MIN' and vTemperature='TEMPERATURE' and vTem=1 ,Round(((avg({< date_x ={">=$(vStartDate)<=$(vEndDate)"}>}value))-32) * 0.5556),
if(vMinMax='MAX', Round(max({< date_x ={">=$(vStartDate)<=$(vEndDate)"}>}value)),
if(vMinMax='AVG' and vTemperature='TEMPERATURE' and vTem=1 ,Round(((avg({< date_x ={">=$(vStartDate)<=$(vEndDate)"}>}value))-32) * 0.5556),
if(vMinMax='MIN',Round(min({< date_x ={">=$(vStartDate)<=$(vEndDate)"}>}value)),
if(vMinMax='AVG',Round(avg({< date_x ={">=$(vStartDate)<=$(vEndDate)"}>}value)),

if(vTem=1 and GetFieldSelections(weather_field)='TEMPERATURE',Round((avg({< date_x ={">=$(vStartDate)<=$(vEndDate)"}>}value)-32) * 0.5556),

Round(avg({< date_x ={">=$(vStartDate)<=$(vEndDate)"}>}value))

)


)
)))))

 

Where variable vMinMax= getfieldselections(stats) 

vTemperature= getfieldselections(weather_field) 

and vTem is used for button selections with value 1/0 (calculation celcius and farhenheit) 

 

Please help in simplifying the complexity to improve the performance of the app 

Labels (2)
0 Replies