<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Optimising if statement calculation in data load editor in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Optimising-if-statement-calculation-in-data-load-editor/m-p/2072470#M87964</link>
    <description>&lt;P&gt;How can I optimise the performance of this if statement in the data load editor?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;table2:
LOAD
*,
if(
(Match(weather_parameter, 'temperature_daily_max') and value &amp;gt; 54.4) or
(Match(weather_parameter, 'temperature_daily_min') and value &amp;lt; -40) or
(Match(weather_parameter, 'temperature_daily_difference') and (value &amp;lt;= 0 OR value &amp;gt; 30)) or
(Match(weather_parameter, 'dewpoint_temperature_daily_mean') and (value &amp;lt; -40 OR value &amp;gt; 50)) or
(Match(weather_parameter, 'relative_humidity_daily_mean') and (value &amp;lt;= 0 OR value &amp;gt; 100)) or
(Match(weather_parameter, 'wind_speed_daily_mean') and (value &amp;lt; 0 OR value &amp;gt; 4300)) or
(Match(weather_parameter, 'precipitation_total_daily_sum') and value &amp;gt; 300) or
(Match(weather_parameter, 'shortwave_radiation_daily_sum') and (value &amp;lt; 1 OR value &amp;gt; 40)),
1,
0
) AS range_constraint_flag
Resident table_1;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Supposedly it will slow down app performance to use if() and Match() according to the wiki (&lt;A href="https://help.qlik.com/en-US/sense/February2023/Subsystems/Hub/Content/Sense_Hub/Apps/app-performance.htm" target="_blank" rel="noopener"&gt;https://help.qlik.com/en-US/sense/February2023/Subsystems/Hub/Content/Sense_Hub/Apps/app-performance.htm&lt;/A&gt;). I doubt using set analysis or nested if statements would be faster.&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 14:13:23 GMT</pubDate>
    <dc:creator>prayner</dc:creator>
    <dc:date>2023-05-17T14:13:23Z</dc:date>
    <item>
      <title>Optimising if statement calculation in data load editor</title>
      <link>https://community.qlik.com/t5/App-Development/Optimising-if-statement-calculation-in-data-load-editor/m-p/2072470#M87964</link>
      <description>&lt;P&gt;How can I optimise the performance of this if statement in the data load editor?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;table2:
LOAD
*,
if(
(Match(weather_parameter, 'temperature_daily_max') and value &amp;gt; 54.4) or
(Match(weather_parameter, 'temperature_daily_min') and value &amp;lt; -40) or
(Match(weather_parameter, 'temperature_daily_difference') and (value &amp;lt;= 0 OR value &amp;gt; 30)) or
(Match(weather_parameter, 'dewpoint_temperature_daily_mean') and (value &amp;lt; -40 OR value &amp;gt; 50)) or
(Match(weather_parameter, 'relative_humidity_daily_mean') and (value &amp;lt;= 0 OR value &amp;gt; 100)) or
(Match(weather_parameter, 'wind_speed_daily_mean') and (value &amp;lt; 0 OR value &amp;gt; 4300)) or
(Match(weather_parameter, 'precipitation_total_daily_sum') and value &amp;gt; 300) or
(Match(weather_parameter, 'shortwave_radiation_daily_sum') and (value &amp;lt; 1 OR value &amp;gt; 40)),
1,
0
) AS range_constraint_flag
Resident table_1;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Supposedly it will slow down app performance to use if() and Match() according to the wiki (&lt;A href="https://help.qlik.com/en-US/sense/February2023/Subsystems/Hub/Content/Sense_Hub/Apps/app-performance.htm" target="_blank" rel="noopener"&gt;https://help.qlik.com/en-US/sense/February2023/Subsystems/Hub/Content/Sense_Hub/Apps/app-performance.htm&lt;/A&gt;). I doubt using set analysis or nested if statements would be faster.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 14:13:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Optimising-if-statement-calculation-in-data-load-editor/m-p/2072470#M87964</guid>
      <dc:creator>prayner</dc:creator>
      <dc:date>2023-05-17T14:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Optimising if statement calculation in data load editor</title>
      <link>https://community.qlik.com/t5/App-Development/Optimising-if-statement-calculation-in-data-load-editor/m-p/2072487#M87966</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 14:50:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Optimising-if-statement-calculation-in-data-load-editor/m-p/2072487#M87966</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-05-17T14:50:51Z</dc:date>
    </item>
  </channel>
</rss>

