<?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: Set analysis and min() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959088#M647462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neetha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Part of your second suggestion worked with a small modification - see below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min ({&amp;lt;[#DealAmount] = {"&amp;gt;0"} &amp;gt;} Year)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bad news is that although the above returns the correct year in a single expression, when I place it in the sales calculation expression it just returns the same value for all dimension entries, that value being the min(Year) where any of the resellers made sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({ &amp;lt; Year= {$(=min ({&amp;lt;[#DealAmount] = {"&amp;gt;0"} &amp;gt;} Year))}&amp;gt;} #DealAmount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To me it really doesn't make sense because both expressions are in the same straight table and resellers are the dimension...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Linda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Oct 2015 10:53:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-10-25T10:53:46Z</dc:date>
    <item>
      <title>Set analysis and min()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959086#M647460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to calculate resellers' sales growth from the first year they started selling so the first year where sum(#DealAmount)&amp;gt;0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression I'm using the identify that year is the one below, but it doesn't seem to work consistently and doesn't calculate the individual min(Year) at dimension level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min ({&amp;lt;Year ={"=sum(#DealAmount) &amp;gt;0"}&amp;gt;} Year)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the same reason, my expression for calculating sales in the first year doesn't work either:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({ &amp;lt; Year= {$(=Min({ &amp;lt;Year ={"=sum(#DealAmount) &amp;gt;0"}&amp;gt;}Year))}&amp;gt;} #DealAmount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm probably missing something silly... Any idea of what that might be? How would you calculate this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Linda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Oct 2015 09:12:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959086#M647460</guid>
      <dc:creator />
      <dc:date>2015-10-25T09:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and min()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959087#M647461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Linda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;min ({&amp;lt;[#DealAmount] -= {'0'}&amp;gt;} Year)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({ &amp;lt; Year= {"$(=Min(Year)"},&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[#DealAmount] &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;-= {'0'}&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;gt;} [#DealAmount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;min ({&amp;lt;[#DealAmount] &amp;gt; 0 &amp;gt;} Year)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({ &amp;lt; Year= {"$(=Min(Year)"},&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[#DealAmount] &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;gt; 0&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;gt;} [#DealAmount])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Oct 2015 10:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959087#M647461</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-25T10:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and min()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959088#M647462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neetha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Part of your second suggestion worked with a small modification - see below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min ({&amp;lt;[#DealAmount] = {"&amp;gt;0"} &amp;gt;} Year)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bad news is that although the above returns the correct year in a single expression, when I place it in the sales calculation expression it just returns the same value for all dimension entries, that value being the min(Year) where any of the resellers made sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({ &amp;lt; Year= {$(=min ({&amp;lt;[#DealAmount] = {"&amp;gt;0"} &amp;gt;} Year))}&amp;gt;} #DealAmount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To me it really doesn't make sense because both expressions are in the same straight table and resellers are the dimension...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Linda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Oct 2015 10:53:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959088#M647462</guid>
      <dc:creator />
      <dc:date>2015-10-25T10:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and min()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959089#M647463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({ &amp;lt; Year= {"$(=Min({ &amp;lt;Year ={"=sum(#DealAmount) &amp;gt;0"}&amp;gt;}Year)")}&amp;gt;} #DealAmount)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Oct 2015 11:17:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959089#M647463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-25T11:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and min()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959090#M647464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope. It returns the same results as my original one... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Oct 2015 11:21:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959090#M647464</guid>
      <dc:creator />
      <dc:date>2015-10-25T11:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and min()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959091#M647465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi linda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;may be try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=sum({&amp;lt; Year= {"$(=min ({&amp;lt;[#DealAmount] = {"&amp;gt;0"}&amp;gt;} Year))"}&amp;gt;} [#DealAmount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;or &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=sum({&amp;lt; Year= {"$(=min ({&amp;lt;#DealAmount = {"&amp;gt;0"}&amp;gt;} Year))"}&amp;gt;} #DealAmount)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Oct 2015 15:24:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959091#M647465</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-25T15:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and min()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959092#M647466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set Expressions are evaluated before the aggregation made so you can't expect different Set Expression for each row of any straight table.&lt;/P&gt;&lt;P&gt;Better if you can calculate the min Year in script itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Oct 2015 17:55:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959092#M647466</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-10-25T17:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and min()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959093#M647467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Linda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first question to ask yourself when formulating advanced Set Analysis filters is - what field should I apply the condition to? Is it Amount? Year? Reseller? Based on your initial question, it looks like Reseller needs to be the one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I'm trying to calculate &lt;STRONG&gt;resellers'&lt;/STRONG&gt; sales growth from the first year&lt;STRONG&gt; they started selling&lt;/STRONG&gt; so the first year where sum(#DealAmount)&amp;gt;0.&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this in mind, your first option would return the sum of the Deal Amount for the first year in your dataset (across all resellers:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({ &amp;lt; Year= {$(=Min({ &amp;lt;Year ={"=sum(#DealAmount) &amp;gt;0"}&amp;gt;}Year))}&amp;gt;} #DealAmount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Reseller is one of your chart dimensions, then Set Analysis cannot be used here, at least on directly. As someone already mentioned in this thread, Set Analysis condition is only calculated once per chart, not once per chart line. If this is the case, you may have to calculate a conditional flag in your data that could make your condition more "static", - in other words, dependent on your chart dimensions, but indirectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if you could mark all the sales in the first year for each reseller with a conditional flag &lt;STRONG&gt;_FirstYear_Flag&lt;/STRONG&gt; (you'd do it in your script), then the calculation for the "First Year Sales" would look rather simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({ &amp;lt; &lt;SPAN style="font-size: 13.3333px;"&gt;_FirstYear_Flag = {1} &lt;/SPAN&gt;&amp;gt;} #DealAmount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Check out my new book &lt;EM&gt;QlikView Your Business&lt;/EM&gt;. In the book, I'm describing in detail how to use advanced Set Analysis conditions for a variety of analytical needs. I also teach an extensive Set Analysis &amp;amp; AGGR session at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for QlikView&lt;/A&gt; - check out our agenda!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Oleg Troyansky&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.amazon.com/gp/product/1118949552/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1118949552&amp;amp;linkCode=as2&amp;amp;tag=natursyner0f-20&amp;amp;linkId=64QJ6MD3O54VZHF7" rel="nofollow"&gt;Check out my new book &lt;EM&gt;QlikView Your Business&lt;/EM&gt;: An expert guide to Business Discovery with QlikView and Qlik Sense&lt;/A&gt;&lt;IMG alt="" border="0" height="1" src="http://ir-na.amazon-adsystem.com/e/ir?t=natursyner0f-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1118949552" style="border: none !important; margin: 0px !important;" width="1" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Oct 2015 21:34:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959093#M647467</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-10-25T21:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and min()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959094#M647468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Just so that you know I am deep into your book these days, which I got directly from you at the Masters Summit in Copenhagen &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt; I'm finding it really helpful and am getting many exciting ideas!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I completely understand what you're saying and was thinking of using flags first but because I didn't like some of the implications I tried this other way. What I really don't get is why &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;min ({&amp;lt;[#DealAmount] = {"&amp;gt;0"} &amp;gt;} Year) returns the correct year at Reseller level whilst the sales calcultation, which includes this same expression, doesn't... I don't see any logic in it and that's why I'm struggling!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could I then refer to the result of &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;min ({&amp;lt;[#DealAmount] = {"&amp;gt;0"} &amp;gt;} Year) in the sales calculation as a workaround? Not sure I can refer to straight table columns in set analysis though...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Linda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2015 11:24:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959094#M647468</guid>
      <dc:creator />
      <dc:date>2015-10-26T11:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and min()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959095#M647469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Linda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a feeling that I remember your name from the Summit &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I understand how these things may look confusing. It makes sense if you try to visualize what's going on in each case:&lt;/P&gt;&lt;P&gt;&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;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;min ({&amp;lt;[#DealAmount] = {"&amp;gt;0"} &amp;gt;} Year)&amp;nbsp; - works, because the SA condition filters all Years in which there were any Sales, irrespective of Reseller. Then, the min() function calculates the minimum Year, aggregated at the Reseller level. For each reseller, its individual min Year is calculated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, the following doesn't work:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f2f2f2;"&gt;sum({ &amp;lt; Year= {$(=Min({ &amp;lt;Year ={"=sum(#DealAmount) &amp;gt;0"}&amp;gt;}Year))}&amp;gt;} #DealAmount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f2f2f2;"&gt;The SA condition calculates the minimum of Year with sum(Sales) &amp;gt;0 - this is a single Year, globally, irrespective of any Resellers. Then, this information cannot be presented by Reseller because the Year was already set to the global min of Sales Year.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f2f2f2;"&gt;To your question -0 no, you can't refer to other columns in Set Analysis. If you can't work with flags for some reason, you might have to revert to the IF() conditions, if the size of the database allows that...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f2f2f2;"&gt;enjoy the book!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #f2f2f2;"&gt;Oleg Troyansky&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 13:55:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-min/m-p/959095#M647469</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2015-10-27T13:55:08Z</dc:date>
    </item>
  </channel>
</rss>

