Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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.