<?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 Help Scripting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962197#M648614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an existing Qlik file, in which I have a chart with the following script (which gather data from different locations):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr (Sum (Money),[Day/Month/Year],MoneyType)&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;This expression works fine in a line chart (in Which I have different selection lists like MoneyType, Country, City, Date Year, Month, Day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am\was looking for an expression that present in a text box , when I select a random period, how much Income do I lose from the start date to the end date.&lt;/P&gt;&lt;P&gt;Now I managed to write an expression in a test environment for a SIMPLE sum expression and It works fine too:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date={'$(=MIn(Date))'}&amp;gt;} Qty1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the test environment which is not 1 to 1 like the production (in which the period selection option is much wider , flexier)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now to my question-problem , since I am not SO! strong yet in the scripting world.&lt;/P&gt;&lt;P&gt;I need to write an expression which show, in a text box, the min (earliest) or max (latest) value for my Aggr expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can not attach the real data files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Oct 2015 06:18:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-10-13T06:18:40Z</dc:date>
    <item>
      <title>Help Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962197#M648614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an existing Qlik file, in which I have a chart with the following script (which gather data from different locations):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr (Sum (Money),[Day/Month/Year],MoneyType)&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;This expression works fine in a line chart (in Which I have different selection lists like MoneyType, Country, City, Date Year, Month, Day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am\was looking for an expression that present in a text box , when I select a random period, how much Income do I lose from the start date to the end date.&lt;/P&gt;&lt;P&gt;Now I managed to write an expression in a test environment for a SIMPLE sum expression and It works fine too:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date={'$(=MIn(Date))'}&amp;gt;} Qty1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the test environment which is not 1 to 1 like the production (in which the period selection option is much wider , flexier)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now to my question-problem , since I am not SO! strong yet in the scripting world.&lt;/P&gt;&lt;P&gt;I need to write an expression which show, in a text box, the min (earliest) or max (latest) value for my Aggr expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can not attach the real data files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 06:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962197#M648614</guid>
      <dc:creator />
      <dc:date>2015-10-13T06:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962198#M648615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I only take&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Nir Gil wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;.....&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Aggr (Sum (Money),[Day/Month/Year],MoneyType)&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;....I need to write an expression which show, in a text box, the min (earliest) or max (latest) value for my Aggr expression.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;since I did not get it properly (perhaps), you could probably try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Max&lt;/STRONG&gt;(Aggr (Sum (Money),[Day/Month/Year],MoneyType)&lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt; ) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 06:26:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962198#M648615</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-10-13T06:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962199#M648616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Well from some reason when I use the &lt;/P&gt;&lt;P&gt;the result is that I get the MAX value from selected period instead of the Latest vale , which is what I am looking for and which work fine in my test environment (for the expression: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;Sum({&amp;lt;Date={'$(=Max(Date))'}&amp;gt;} Qty1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume the Max should be integrated before the Day\Month\Year field :&lt;/P&gt;&lt;P&gt;Like: Aggr (Sum (Money),&lt;STRONG&gt;MAX&lt;/STRONG&gt;[Day\Month\Year,Moneytype)&amp;nbsp; -&amp;nbsp; but I can not find the correct script for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 07:32:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962199#M648616</guid>
      <dc:creator />
      <dc:date>2015-10-13T07:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962200#M648617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you explain your expected output against a selection in your sample provided?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 07:36:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962200#M648617</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-10-13T07:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962201#M648618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK,&lt;/P&gt;&lt;P&gt;In my provided sample the results are as expected!&lt;/P&gt;&lt;P&gt;I want to show the Latest (Max)&amp;nbsp; {and the earliest(Min)} value from the selected period which the user select in external year, month and day list boxs. (For example the user can select the last week, April-May 2014, 13-18.6.2015 and set)&lt;/P&gt;&lt;P&gt;In my real world, I use a more complicated aggregated-Sum expression.&lt;/P&gt;&lt;P&gt;But when I use: &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Max&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;(Aggr (Sum (Money),[Day/Month/Year],MoneyType)&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt; )&lt;/SPAN&gt; the out put is not the latest value (from the selected period) , it is the largest (max) value.&lt;/P&gt;&lt;P&gt;The max should be somehow scripted in a condition , I guess, like in the sample result.&lt;/P&gt;&lt;P&gt;Nir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 07:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962201#M648618</guid>
      <dc:creator />
      <dc:date>2015-10-13T07:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962202#M648619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;&lt;STRONG&gt;FirstSortedValue&lt;/STRONG&gt;( Aggr (Sum (Money),[Day/Month/Year],MoneyType), - &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;[Day/Month/Year])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would give you recent most amount provided you time dimension [Day/Month/year] is a real timestamp/date field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 08:21:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962202#M648619</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-10-13T08:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help Scripting</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962203#M648620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I appreciate your effort,&lt;/P&gt;&lt;P&gt;The suggested expression does not work. (no result is shown)&lt;/P&gt;&lt;P&gt;Whereas : Max (Aggr (Sum (Money),[Day/Month/Year],MoneyType)) - works BUT bring the MAX value , not the latest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Yes - Day/Month/Year is a real date field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 08:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Scripting/m-p/962203#M648620</guid>
      <dc:creator />
      <dc:date>2015-10-13T08:41:44Z</dc:date>
    </item>
  </channel>
</rss>

