<?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 Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943408#M325139</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that you have current year and last year in variables, you could do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Customer={"=Sum({1&amp;lt;Year={"$(vLastYear)"}&amp;gt;} Sales)=0 and &lt;SPAN style="font-size: 13.3333px;"&gt;Sum(&lt;SPAN style="font-size: 13.3333px;"&gt;{1&amp;lt;Year={"$(vCurrentYear)"}&amp;gt;}&lt;/SPAN&gt;Sales)&amp;gt;0&lt;/SPAN&gt;"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words: An expression search where the conditions are defined through Set Analysis. The outer Sum( ... Sales) can of course be replace by another appropriate aggregation. See also &lt;A href="https://community.qlik.com/qlik-blogpost/4107"&gt;The Expression Search&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Sep 2015 21:41:27 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2015-09-25T21:41:27Z</dc:date>
    <item>
      <title>Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943406#M325137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one help me on how to write a set expression for, the customers who are having sales amount 0 in the last year and above 0 in the Current Year. ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 18:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943406#M325137</guid>
      <dc:creator />
      <dc:date>2015-09-25T18:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943407#M325138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see this documents&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 21:02:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943407#M325138</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2015-09-25T21:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943408#M325139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that you have current year and last year in variables, you could do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Customer={"=Sum({1&amp;lt;Year={"$(vLastYear)"}&amp;gt;} Sales)=0 and &lt;SPAN style="font-size: 13.3333px;"&gt;Sum(&lt;SPAN style="font-size: 13.3333px;"&gt;{1&amp;lt;Year={"$(vCurrentYear)"}&amp;gt;}&lt;/SPAN&gt;Sales)&amp;gt;0&lt;/SPAN&gt;"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words: An expression search where the conditions are defined through Set Analysis. The outer Sum( ... Sales) can of course be replace by another appropriate aggregation. See also &lt;A href="https://community.qlik.com/qlik-blogpost/4107"&gt;The Expression Search&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 21:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943408#M325139</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-09-25T21:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943409#M325140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using element functions ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Concat( DISTINCT&amp;nbsp; &lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;1 &amp;lt; CustomerID=P( {1&amp;lt;ID={"=Sum(Sales)=0"},Year={$(=Year(Today())-1)}&amp;gt;} ) &amp;gt; &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;1 &amp;lt; CustomerID=P( {1&amp;lt;ID={"=Sum(Sales)&amp;gt;0"},Year={$(=Year(Today()))}&amp;gt;} ) &amp;gt;&lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&amp;nbsp; Customer&lt;/P&gt;&lt;P&gt;&amp;nbsp; , ','&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 21:49:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943409#M325140</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-09-25T21:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943410#M325141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Add the following expression to any chart as expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;({$&amp;lt;&lt;SPAN style="color: #800000;"&gt;Customer&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"=Sum({1&amp;lt;Year={$(=Year(Today()) - 1)}&amp;gt;} [Sold $])=0 and Sum({1&amp;lt;Year={$(=Year(Today()))}&amp;gt;} [Sold $])&amp;gt;0"&lt;/SPAN&gt;}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;[Sold $]&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Here:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;: is your field which you check for no sales last year but this year (so it is new customer/business)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Year:&lt;/STRONG&gt; is the year field in the model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Sold $:&lt;/STRONG&gt; is the metric/KPI which you want to check. That is probably &lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;You might achieve similar results in many different ways. If it is just selecting Customers/IDs Petter's post help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Ersen&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 22:24:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/943410#M325141</guid>
      <dc:creator />
      <dc:date>2015-09-25T22:24:56Z</dc:date>
    </item>
  </channel>
</rss>

