<?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: maximum and minimum between periods in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/maximum-and-minimum-between-periods/m-p/554247#M207080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.) I think the problem is that your decimal seperator is set to ',' while your index data contains a dot as a dec seperator. This way, numerical functions like max() will not evaluate properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.) For calculating the days between these dates I suggest you use something like this:&lt;/P&gt;&lt;P&gt;=networkdays (Only({&amp;lt;Maximo=$(=max(Maximo))&amp;gt;} Fecha), Only({&amp;lt;Minimo=$(=min(Minimo))&amp;gt;} Fecha)) + networkdays (Only({&amp;lt;Minimo=$(=min(Minimo))&amp;gt;} Fecha), Only({&amp;lt;Maximo=$(=max(Maximo))&amp;gt;} Fecha))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I summed networkdays because you need to consider two cases: &lt;/P&gt;&lt;P&gt;1) the min is earlier than the max&lt;/P&gt;&lt;P&gt;2) the max is earlier than the min&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't tested the above formula so small adjustments will probably be necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Writing a formula which considers the right amount of holidays for each index will be a challenge.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jul 2013 08:21:55 GMT</pubDate>
    <dc:creator>simondachstr</dc:creator>
    <dc:date>2013-07-09T08:21:55Z</dc:date>
    <item>
      <title>maximum and minimum between periods</title>
      <link>https://community.qlik.com/t5/QlikView/maximum-and-minimum-between-periods/m-p/554246#M207079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt; Hello&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt; &lt;SPAN class="hps"&gt;I am new to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Qlikview&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;and&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I have&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a very simple problem&lt;/SPAN&gt;, &lt;SPAN class="hps"&gt;that&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is:&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN class="hps"&gt;I want to calculate&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;maximum and minimum values&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;​​within a&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;selected&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;date range&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;and&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I do not get&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;any&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;value&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;using&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the expressions:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN class="hps"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt; maximum value&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="hps"&gt;Aggr&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;(&lt;/SPAN&gt;&lt;SPAN class="atn"&gt;Max (&lt;/SPAN&gt;Máximo), &lt;SPAN class="hps"&gt;Ticker&lt;/SPAN&gt;, &lt;SPAN class="hps"&gt;Mes_Vencimiento&lt;/SPAN&gt;)&lt;SPAN class="hps"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;SPAN class="hps"&gt; minimum value&lt;/SPAN&gt;:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="hps"&gt;Aggr&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;(Min&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;(Minimo)&lt;/SPAN&gt;, &lt;SPAN class="hps"&gt;Ticker&lt;/SPAN&gt;, &lt;SPAN class="hps"&gt;Mes_Vencimiento&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;I tried putting the date fields in the expression but neither works. I do not generate any results.&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;BR /&gt;&lt;IMG __jive_id="43789" class="jive-image-thumbnail jive-image" height="119" onclick="" alt="Tabla1.png" src="https://community.qlik.com/legacyfs/online/43789_Tabla1.png" width="620" /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Instead if I calculated the initial value at the opening of the first day of the date range and the closing value of the last day of the date range. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;With the following expressions:&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt; FirstSortedValue (Apertura,Fecha)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt; FirstSortedValue (Cierre,-Fecha)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;The data structure&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;is as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;IMG __jive_id="43790" class="jive-image" alt="estructura datos.png" src="/legacyfs/online/43790_estructura datos.png" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;The values ​​that&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt; &lt;SPAN class="hps"&gt;I&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;had&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;to figure&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;can be seen in&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the accompanying table.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="43791" class="jive-image" alt="Tabla2.png" src="https://community.qlik.com/legacyfs/online/43791_Tabla2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt; &lt;SPAN class="hps"&gt;For example&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;maximum&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;period&lt;/SPAN&gt; of the &lt;SPAN class="hps"&gt;DJI&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;4772.56&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;corresponding to the day&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;08.02.1995&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;of the selected period&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;and&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the minimum would be&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the&amp;nbsp; value&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;4587.66&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;corresponding to the day&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;17/8/1995&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;I also like to know how to calculate the days between these dates with respect to the beginning of the period or at the end of the period.&lt;BR /&gt; &lt;BR /&gt; Greetings and thank you very much.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 07:49:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maximum-and-minimum-between-periods/m-p/554246#M207079</guid>
      <dc:creator />
      <dc:date>2013-07-09T07:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: maximum and minimum between periods</title>
      <link>https://community.qlik.com/t5/QlikView/maximum-and-minimum-between-periods/m-p/554247#M207080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.) I think the problem is that your decimal seperator is set to ',' while your index data contains a dot as a dec seperator. This way, numerical functions like max() will not evaluate properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.) For calculating the days between these dates I suggest you use something like this:&lt;/P&gt;&lt;P&gt;=networkdays (Only({&amp;lt;Maximo=$(=max(Maximo))&amp;gt;} Fecha), Only({&amp;lt;Minimo=$(=min(Minimo))&amp;gt;} Fecha)) + networkdays (Only({&amp;lt;Minimo=$(=min(Minimo))&amp;gt;} Fecha), Only({&amp;lt;Maximo=$(=max(Maximo))&amp;gt;} Fecha))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I summed networkdays because you need to consider two cases: &lt;/P&gt;&lt;P&gt;1) the min is earlier than the max&lt;/P&gt;&lt;P&gt;2) the max is earlier than the min&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't tested the above formula so small adjustments will probably be necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Writing a formula which considers the right amount of holidays for each index will be a challenge.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 08:21:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maximum-and-minimum-between-periods/m-p/554247#M207080</guid>
      <dc:creator>simondachstr</dc:creator>
      <dc:date>2013-07-09T08:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: maximum and minimum between periods</title>
      <link>https://community.qlik.com/t5/QlikView/maximum-and-minimum-between-periods/m-p/554248#M207081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;Thank you very much&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for the prompt reply&lt;/SPAN&gt;, I tried &lt;SPAN class="hps"&gt;changing the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;decimal formats&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;and works properly&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;maximum and minimum&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;functions&lt;/SPAN&gt;.&lt;BR /&gt;&lt;BR /&gt; T&lt;SPAN class="hps"&gt;he calculation of&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;days&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;between these values&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;​​will try&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;with the formulas&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;recommended&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 09:39:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/maximum-and-minimum-between-periods/m-p/554248#M207081</guid>
      <dc:creator />
      <dc:date>2013-07-09T09:39:48Z</dc:date>
    </item>
  </channel>
</rss>

