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: 
prayner
Contributor III
Contributor III

Optimising if statement calculation in data load editor

How can I optimise the performance of this if statement in the data load editor?

 

table2:
LOAD
*,
if(
(Match(weather_parameter, 'temperature_daily_max') and value > 54.4) or
(Match(weather_parameter, 'temperature_daily_min') and value < -40) or
(Match(weather_parameter, 'temperature_daily_difference') and (value <= 0 OR value > 30)) or
(Match(weather_parameter, 'dewpoint_temperature_daily_mean') and (value < -40 OR value > 50)) or
(Match(weather_parameter, 'relative_humidity_daily_mean') and (value <= 0 OR value > 100)) or
(Match(weather_parameter, 'wind_speed_daily_mean') and (value < 0 OR value > 4300)) or
(Match(weather_parameter, 'precipitation_total_daily_sum') and value > 300) or
(Match(weather_parameter, 'shortwave_radiation_daily_sum') and (value < 1 OR value > 40)),
1,
0
) AS range_constraint_flag
Resident table_1;

 

 Supposedly it will slow down app performance to use if() and Match() according to the wiki (https://help.qlik.com/en-US/sense/February2023/Subsystems/Hub/Content/Sense_Hub/Apps/app-performance...). I doubt using set analysis or nested if statements would be faster.

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

I think you may have misread that link. If() / Match() should be avoided where possible in sheets, not during the data load, and set analysis isn't available in data load to begin with. I doubt this sort of statement will impact your load time to a significant degree, and there's no reason why it would impact app performance from a user's perspective.

View solution in original post

1 Reply
Or
MVP
MVP

I think you may have misread that link. If() / Match() should be avoided where possible in sheets, not during the data load, and set analysis isn't available in data load to begin with. I doubt this sort of statement will impact your load time to a significant degree, and there's no reason why it would impact app performance from a user's perspective.