<?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: What is Faster, a Sum or a Max in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-is-Faster-a-Sum-or-a-Max/m-p/1425253#M611120</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These questions are best answered by testing on your data. It is hard to make predictions without those tests as it depends on a while lot of factors. I would expect the Max and the Sum to take a similar amount of time - but I don't see how Max() will answer the first question for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the second question, I would expect the second expression to be a little faster, but again you would need to test and the difference may be negligible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Nov 2017 09:33:40 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2017-11-07T09:33:40Z</dc:date>
    <item>
      <title>What is Faster, a Sum or a Max</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Faster-a-Sum-or-a-Max/m-p/1425252#M611119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have a question about optimisation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose that my table have binary data on a dimension (0 or 1) named "IsConnected" that is telling that if someday a product is or is (1) not (0) connected, every day. If you select a period of some days (maybe it depends on the size of days you select, let's suppose that is huge) what is better to do in order to improve the efficiency of the formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Sum(IsConnected)&lt;/LI&gt;&lt;LI&gt;Max(IsConnected)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since it is a relational DB, I think it is easier to do a Max because QlikView have a Inner Table with the different values of the dimensions so it has only to check between two values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second question (less important for me now) and maybe more tricky is: What if the variable is not binary? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: Suppose that we have the number of Connected Hours of a product, in one column we have the accumualated of the connected ours ("Accum_Conected_Hours") and on the other the ours that this product has been connected this day (Daily_Conected_Hours) . What it's better in order to calculate the total hours that the product has been connected on a given period:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt; Sum(&lt;SPAN style="font-size: 13.3333px;"&gt;Daily_Conected_Hours)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt; Max(&lt;SPAN style="font-size: 13.3333px;"&gt;Accum_Conected_Hours) - Min (&lt;SPAN style="font-size: 13.3333px;"&gt;Accum_Conected_Hours) *&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* I am aware that doing a max - min may be the result is not the same but it can be fixed with a set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dummy data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="490"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;Day&lt;/TD&gt;&lt;TD width="93"&gt;IsConected&lt;/TD&gt;&lt;TD width="170"&gt;Daily_Conected_Hours&lt;/TD&gt;&lt;TD class="xl63" width="163"&gt;Accum_Conected_Hours&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;TD align="right"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;3&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;8&lt;/TD&gt;&lt;TD align="right"&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;4&lt;/TD&gt;&lt;TD align="right"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;5&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;TD align="right"&gt;27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;6&lt;/TD&gt;&lt;TD align="right"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;7&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;TD align="right"&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;8&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;8&lt;/TD&gt;&lt;TD align="right"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;9&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;TD align="right"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;10&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;TD align="right"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;11&lt;/TD&gt;&lt;TD align="right"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;0&lt;/TD&gt;&lt;TD align="right"&gt;55&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2017 09:22:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Faster-a-Sum-or-a-Max/m-p/1425252#M611119</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-07T09:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: What is Faster, a Sum or a Max</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Faster-a-Sum-or-a-Max/m-p/1425253#M611120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These questions are best answered by testing on your data. It is hard to make predictions without those tests as it depends on a while lot of factors. I would expect the Max and the Sum to take a similar amount of time - but I don't see how Max() will answer the first question for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the second question, I would expect the second expression to be a little faster, but again you would need to test and the difference may be negligible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2017 09:33:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Faster-a-Sum-or-a-Max/m-p/1425253#M611120</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-11-07T09:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: What is Faster, a Sum or a Max</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Faster-a-Sum-or-a-Max/m-p/1425254#M611121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You &lt;A href="https://community.qlik.com/qlik-users/13229"&gt;jontydkpi&lt;/A&gt;‌, is there a way to check this by myself curately?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2017 08:14:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Faster-a-Sum-or-a-Max/m-p/1425254#M611121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-08T08:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: What is Faster, a Sum or a Max</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-Faster-a-Sum-or-a-Max/m-p/1425255#M611122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can check the execution times of objects (eg tables or charts), but not the individual expressions. So create two tables using the Sum() in one and the Max() in the second. Check the objects IDs in the tables' properties dialog,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then recalculate by making different selections in some field that would affect the calculation results. Then open Document Properties | Sheets and look up the calculation time (Calc Time in the lower box). The relative times will give an indication of which expression is faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It helps if your data set is quite large.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2017 12:13:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-Faster-a-Sum-or-a-Max/m-p/1425255#M611122</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-11-08T12:13:18Z</dc:date>
    </item>
  </channel>
</rss>

