<?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: get min Year with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179946#M382569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14734530267551041 jive_text_macro" jivemacro_uid="_14734530267551041"&gt;
&lt;P&gt;=sum(&lt;/P&gt;
&lt;P&gt;{$&amp;lt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Location = {"=sum({1&amp;lt;Location = {$(vLocation)}&amp;gt;}Amount)&amp;gt;0"}&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ,Company =&lt;/P&gt;
&lt;P&gt;&amp;gt;}&lt;/P&gt;
&lt;P&gt;Amount)&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The vLocation variable:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14734530586423876" jivemacro_uid="_14734530586423876"&gt;
&lt;P&gt;=Concat({$&amp;lt;Location = {'Location1*'}&amp;gt;}Location, ', ')&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="137004" alt="Screenshot_3.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/137004_Screenshot_3.png" style="height: 282px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example is attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;UPDATE: sorry, misunderstood the issue.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Sep 2016 20:32:10 GMT</pubDate>
    <dc:creator>MindaugasBacius</dc:creator>
    <dc:date>2016-09-09T20:32:10Z</dc:date>
    <item>
      <title>get min Year with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179944#M382567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wrestling with this problem: I've defined a market with set analysis and I want to get the min Year where sum(Amount) &amp;gt; 0 as a variable. Does anyone know how I would do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my set analysis looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Company=,Location={'$(vLocation)'}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought I would do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue(Year,aggr(if(&lt;SPAN style="font-size: 13.3333px;"&gt;sum({&amp;lt;Company=,Location={'$(vLocation)'}&amp;gt;}Amount)&amp;gt;0,1,0),Year))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for some reason, the above expression returned an incorrect year. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this expression correct or are there other ways?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 19:24:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179944#M382567</guid>
      <dc:creator />
      <dc:date>2016-09-09T19:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: get min Year with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179945#M382568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Min({&amp;lt;Year = {"=Sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Company, Location = {'$(vLocation)'}&amp;gt;} &lt;/SPAN&gt;Amount) &amp;gt; 0"}&amp;gt;}Year)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 20:30:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179945#M382568</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-09T20:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: get min Year with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179946#M382569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14734530267551041 jive_text_macro" jivemacro_uid="_14734530267551041"&gt;
&lt;P&gt;=sum(&lt;/P&gt;
&lt;P&gt;{$&amp;lt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Location = {"=sum({1&amp;lt;Location = {$(vLocation)}&amp;gt;}Amount)&amp;gt;0"}&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ,Company =&lt;/P&gt;
&lt;P&gt;&amp;gt;}&lt;/P&gt;
&lt;P&gt;Amount)&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The vLocation variable:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14734530586423876" jivemacro_uid="_14734530586423876"&gt;
&lt;P&gt;=Concat({$&amp;lt;Location = {'Location1*'}&amp;gt;}Location, ', ')&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="137004" alt="Screenshot_3.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/137004_Screenshot_3.png" style="height: 282px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example is attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;UPDATE: sorry, misunderstood the issue.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 20:32:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179946#M382569</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2016-09-09T20:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: get min Year with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179947#M382570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This didn't seem to work, but thank you for replying&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:23:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179947#M382570</guid>
      <dc:creator />
      <dc:date>2016-09-12T13:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: get min Year with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179948#M382571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did it give anything? or did you get an error in syntax? Would you be able to provide a sample with expected output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:32:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179948#M382571</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-12T13:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: get min Year with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179949#M382572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe I got it to work with the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Min(if(aggr(SUM({&amp;lt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px;"&gt;Company, Location = {'$(vLocation)'}&lt;/SPAN&gt;&amp;gt;}Amount),Year)&amp;gt;0,Year),Year)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:40:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179949#M382572</guid>
      <dc:creator />
      <dc:date>2016-09-12T13:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: get min Year with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179950#M382573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The text object gave me a ' - ' . I think I have a solution now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179950#M382573</guid>
      <dc:creator />
      <dc:date>2016-09-12T13:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: get min Year with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179951#M382574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it like ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(Aggr(sum({&amp;lt;Company=,Location={'$(vLocation)'}&amp;gt;}Amount)&amp;gt;0,Min(year))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 14:39:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/get-min-Year-with-set-analysis/m-p/1179951#M382574</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-12T14:39:39Z</dc:date>
    </item>
  </channel>
</rss>

