<?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 Re: Pick Match vs Nested If Performance in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pick-Match-vs-Nested-If-Performance/m-p/1174462#M911945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can have a look at this discussion:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/188475"&gt;Why is using Pick and Match functions combination thought to be faster than nested IF statements?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMHO, a pick() / match() combination is better readible and maintainable than a nested if() construct, that's why I prefer to use it, especially in the front end when doing the comparison on dimensional values (and here it often doesn't matter performance wise).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script, things might be different performance wise, so just run some tests yourself, with your data (there is some sample code in the thread I've linked above).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 May 2016 22:43:38 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-05-31T22:43:38Z</dc:date>
    <item>
      <title>Pick Match vs Nested If Performance</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-Match-vs-Nested-If-Performance/m-p/1174461#M911944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am new to Qlikview and really getting into Qlikview after learning more and more most of which I did from Qlikview 11 for Developers and Cookbook('God Bless both books' Authors for making such a great effort and saving mine as well as other people's time! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;). Can someone demonstrate the performance difference between pick(match()) combination and nested if() functions if possible both in script and front end side. Sample apps would be really appreciated. I have seen my senior's report and he has used lots of nested if conditions on front end expression of a pivot table(about 25-30 total if() approximately). I am learning from his apps so I think those if() should be replaced by pick match combination but only if they increase the performance significantly. I am asking this because I had read in QV 11 Dev Book that Pick function has a performance improvement over If.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Salman.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-Match-vs-Nested-If-Performance/m-p/1174461#M911944</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pick Match vs Nested If Performance</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-Match-vs-Nested-If-Performance/m-p/1174462#M911945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can have a look at this discussion:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/188475"&gt;Why is using Pick and Match functions combination thought to be faster than nested IF statements?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMHO, a pick() / match() combination is better readible and maintainable than a nested if() construct, that's why I prefer to use it, especially in the front end when doing the comparison on dimensional values (and here it often doesn't matter performance wise).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script, things might be different performance wise, so just run some tests yourself, with your data (there is some sample code in the thread I've linked above).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 22:43:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-Match-vs-Nested-If-Performance/m-p/1174462#M911945</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-31T22:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pick Match vs Nested If Performance</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-Match-vs-Nested-If-Performance/m-p/1174463#M911946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have never done a direct performance comparing from nested if-loops to pick(match()) functions but in my experience the differences are very big especially if the calculations within are quite heavily. The reason for it is quite obvious - within the pick(match()) you calculate the to comparing measure only once and within the if-loop it will be calculated again and again until the condition will be true - whereby I'm not really sure if this in qlikview is applied in this way (like in many other tools) then I have heard that qlikview had a different implementation and calculates at first all if-branches and compared afterwards which are true or false.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beside them are if-loops limited to max. 99 nestings and like Stefan mentioned is the readability and maintainability from heavily nested constructions are quite bad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further you should check if some of these if's could be replaced by set analysis conditions which will also speed up a calculation enormously: &lt;A href="https://community.qlik.com/qlik-blogpost/4076"&gt;A Primer on Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 07:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-Match-vs-Nested-If-Performance/m-p/1174463#M911946</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-06-01T07:56:52Z</dc:date>
    </item>
  </channel>
</rss>

