<?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: Evaluate different dates in a expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753455#M1039689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Intuyo que hablás español. Fijate en la última pestaña del script del qvw que adjunto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hay que hacer una tabla auxiliar desconectada con las fechas, y luego usás esas fechas para compararlas con Fecha y Fecha_2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2014 19:38:20 GMT</pubDate>
    <dc:creator>sebastiandperei</dc:creator>
    <dc:date>2014-12-17T19:38:20Z</dc:date>
    <item>
      <title>Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753447#M1039681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I wanna make a expression in a Pivot Table, where there is only one dimension, &lt;STRONG&gt;Date&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;The expression is a division between the balance today and the total balance 2 months ago.&lt;/P&gt;&lt;P&gt;The field &lt;STRONG&gt;Date&lt;/STRONG&gt; is for any date, and &lt;STRONG&gt;Date_2&lt;/STRONG&gt; is a date 2 month before &lt;STRONG&gt;Date&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the expresion made:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(Aggr(sum( {&amp;lt;cod_Situation = {3} &amp;gt;} BuvBalance), &lt;STRONG&gt;Date&lt;/STRONG&gt;))/&lt;/P&gt;&lt;P&gt;sum(Aggr(sum( {&amp;lt;cod_Situation = {1, 2, 3, 4, 5, 6, 7, 8, 9} &amp;gt;} BuvBalance), &lt;STRONG&gt;Date_2&lt;/STRONG&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the expression can not evaluate correctly &lt;STRONG&gt;Date_2&lt;/STRONG&gt;, and the dividend does not work correctly.&lt;/P&gt;&lt;P&gt;In fact, looks like it evaluate &lt;STRONG&gt;Date_2&lt;/STRONG&gt; as &lt;STRONG&gt;Date&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 12:21:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753447#M1039681</guid>
      <dc:creator />
      <dc:date>2014-12-17T12:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753448#M1039682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the help file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a special function for advanced aggregations:&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;&lt;EM&gt;aggr (&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN class="Italic"&gt;[ &lt;SPAN class="Bold"&gt;distinct&lt;/SPAN&gt; | &lt;SPAN class="Bold"&gt;nodistinct&lt;/SPAN&gt; ] [{set_expression}]expression {, dimension}&lt;/SPAN&gt;&lt;/EM&gt;&lt;EM&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Returns a set of values of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; calculated over &lt;SPAN style="color: #ff0000; font-style: italic;"&gt;&lt;STRONG&gt;dimensions&lt;/STRONG&gt;&lt;/SPAN&gt;. The result can be compared to the expression column of a 'local chart', evaluated in the context where the &lt;SPAN class="Bold"&gt;aggr&lt;/SPAN&gt; function resides. &lt;STRONG style=": ; color: #ff0000;"&gt;&lt;EM&gt;Each &lt;SPAN class="Italic"&gt;dimension&lt;/SPAN&gt; must be a single field&lt;/EM&gt;&lt;/STRONG&gt;. &lt;STRONG&gt;&lt;EM&gt;It &lt;SPAN style="color: #ff0000;"&gt;cannot&lt;/SPAN&gt; be an expression (calculated dimension)&lt;/EM&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 12:25:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753448#M1039682</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-12-17T12:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753449#M1039683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert for the answer.&lt;/P&gt;&lt;P&gt;I was trying to understand how to use distinct in the expresion and reach to these expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I simplified the expresion but the idea is the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Case 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;cod_Situation = {3} &amp;gt;} BuvBalance)/&lt;/P&gt;&lt;P&gt;sum(Aggr(distinct(sum( {&amp;lt;cod_Situation = {3} &amp;gt;} BuvBalance)), Date, Date_2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Case 2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;cod_Situation = {3} &amp;gt;} BuvBalance)/&lt;/P&gt;&lt;P&gt;sum(Aggr(distinct(sum( {&amp;lt;cod_Situation = {3} &amp;gt;} BuvBalance)), Date_2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both cases the result for the expression is 1, so it means that dividend and divisor are the same.&lt;/P&gt;&lt;P&gt;For the dividend expresion it take the Date value defined in Dimension, and in the divisor the same, so im doing wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe with this new try, you have any other advise : )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 16:25:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753449#M1039683</guid>
      <dc:creator />
      <dc:date>2014-12-17T16:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753450#M1039684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bernando,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you please share a simple app to visualize what you are aiming to gain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 16:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753450#M1039684</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-12-17T16:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753451#M1039685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For sure Janusz, any doubt let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 17:08:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753451#M1039685</guid>
      <dc:creator />
      <dc:date>2014-12-17T17:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753452#M1039686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain what you're trying to show in the pivot table? What should the output be?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 18:50:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753452#M1039686</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-12-17T18:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753453#M1039687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, for sure!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The company make a balance every day, in this expression i wanna make a indicator that compare the balance of today between the balance 2 months ago.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For that I need to divide the value of the balance today, and the value of the balance 2 months ago.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that helping?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 19:09:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753453#M1039687</guid>
      <dc:creator />
      <dc:date>2014-12-17T19:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753454#M1039688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that helps. You don't want to use set analysis for this. The set is calculated at the chart level, not at the row level. You can add a small helper table to link each date with the date two months earlier. See attached qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 19:22:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753454#M1039688</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-12-17T19:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753455#M1039689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Intuyo que hablás español. Fijate en la última pestaña del script del qvw que adjunto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hay que hacer una tabla auxiliar desconectada con las fechas, y luego usás esas fechas para compararlas con Fecha y Fecha_2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 19:38:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753455#M1039689</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2014-12-17T19:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753456#M1039690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys, thanks for the help!&lt;/P&gt;&lt;P&gt;Im still working on that, probably soon i would get the right implementation.&lt;/P&gt;&lt;P&gt;Any news i would update the post, thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PD: Correcto Sebastian, gracias por el consejo!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 18:51:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753456#M1039690</guid>
      <dc:creator />
      <dc:date>2015-01-05T18:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate different dates in a expression</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753457#M1039691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, si funcionó, marcá el post como respondido, así se cierra.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 13:33:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-different-dates-in-a-expression/m-p/753457#M1039691</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2015-01-29T13:33:49Z</dc:date>
    </item>
  </channel>
</rss>

