<?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 Set analysis help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/141666#M505708</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple set analysis formula:&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;({&amp;lt;TxSort&amp;lt;{0}, Transaction={'MARKDOWNS'}, NRF_YR={&lt;B&gt;&lt;I&gt;$(=only(NRF_YR))&lt;/I&gt;&lt;/B&gt;}, NRF_WK_NO &amp;lt;={&lt;B&gt;&lt;I&gt;$(%currentweeknum)&lt;/I&gt;&lt;/B&gt;}&amp;gt;} Retail &lt;P&gt;)&lt;/P&gt;&lt;P&gt;Notice the &amp;lt;= relation used on the last item. This does not work as expected, the relationship is actuall ignored and all NRF_WK_NO values are considered, throwing off the numbers. However, if I just use the "=" relation, the data returned is for the one value selcted. Any ideas?&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Apr 2009 04:51:20 GMT</pubDate>
    <dc:creator>sczetty</dc:creator>
    <dc:date>2009-04-17T04:51:20Z</dc:date>
    <item>
      <title>Set analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/141666#M505708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple set analysis formula:&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;({&amp;lt;TxSort&amp;lt;{0}, Transaction={'MARKDOWNS'}, NRF_YR={&lt;B&gt;&lt;I&gt;$(=only(NRF_YR))&lt;/I&gt;&lt;/B&gt;}, NRF_WK_NO &amp;lt;={&lt;B&gt;&lt;I&gt;$(%currentweeknum)&lt;/I&gt;&lt;/B&gt;}&amp;gt;} Retail &lt;P&gt;)&lt;/P&gt;&lt;P&gt;Notice the &amp;lt;= relation used on the last item. This does not work as expected, the relationship is actuall ignored and all NRF_WK_NO values are considered, throwing off the numbers. However, if I just use the "=" relation, the data returned is for the one value selcted. Any ideas?&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 04:51:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/141666#M505708</guid>
      <dc:creator>sczetty</dc:creator>
      <dc:date>2009-04-17T04:51:20Z</dc:date>
    </item>
    <item>
      <title>Set analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/141667#M505709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're thinking of a set modifier as a traditional SQL query, which it is not. Think more like how you would do it in a QlikView listbox. If you have listbox with year want to sum sales for 2000, you might do:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;year = {2000}&amp;gt;} [Sales])&lt;/P&gt;&lt;P&gt;If you want 2000 and 2004:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;year = {2000,2004}&amp;gt;} [Sales])&lt;/P&gt;&lt;P&gt;You can also include searches in the set, but then you need ""s... so this would get you year 2000 and any year starting with 19:&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;sum({&amp;lt;year = {2000,"19*"}&amp;gt;} [Sales])&lt;/P&gt;&lt;DIV&gt;and... now for the actual question you asked... if you want years higher than 2002:&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;sum({&amp;lt;year = {"&amp;gt;2000"}&amp;gt;} [Sales])&lt;/P&gt;&lt;P&gt;If you notice above, this is exactly the same syntax you would use if you were searching in an actual listbox... so, one easy way to build a set analysis statement is to think about how you would search for what you need in a listbox.&lt;/P&gt;&lt;P&gt;As a side note... you can do even cooler things here... imagine totaling sales for all customers who had more than 3 orders:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Customer = {"=count[OrderID] &amp;gt; 3"}&amp;gt;} [Sales])&lt;/P&gt;&lt;P&gt;If you type =count[OrderID] &amp;gt; 3 into the search section of the customer listbox, you'll get a list of customers who have bought more than three orders... and the sum above is calculated against that set.&lt;/P&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 07:01:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/141667#M505709</guid>
      <dc:creator />
      <dc:date>2009-04-17T07:01:58Z</dc:date>
    </item>
    <item>
      <title>Set analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/141668#M505710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any one that can assist me with the line below:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;=Sum({$&amp;lt;[Account Type]={'Income Statement'},[ProjReport Sort]={'C.'}, [Job Code]={'&amp;gt;=$(2000)'} &amp;gt;} Amount)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;It does not work if I include the last section &lt;STRONG&gt;[Job Code]={'&amp;gt;=$(2000)'}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 16:37:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/141668#M505710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-15T16:37:57Z</dc:date>
    </item>
    <item>
      <title>Set analysis help</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/141669#M505711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H4&gt;Hi,&lt;/H4&gt;&lt;H4&gt;With reference to your post:- As a side note... you can do even cooler things here... imagine totaling sales for all customers who had more than 3 orders: sum({&amp;lt;Customer = {"=count[OrderID] &amp;gt; 3"}&amp;gt;} [Sales]) ,&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;I was trying to pick sales people whose total sales are greater than 5000. I could achieve this using aggregation functions/flags which I want to avoid:- =if(aggr(sum(sales),name)&amp;gt;5000,sum(sales))&lt;/H4&gt;&lt;H4&gt;How can I use Set Analysis to achieve the same? I tried =sum({&amp;lt;name = {"=sum[sales] &amp;gt; 5000"}&amp;gt;} [Sales]) , but its not working.&lt;/H4&gt;&lt;H4&gt;Do aggregation functions work within set analysis? If no, how can I go about it?&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Siddharth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 21:57:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-help/m-p/141669#M505711</guid>
      <dc:creator>siddharth_kulka</dc:creator>
      <dc:date>2009-10-15T21:57:08Z</dc:date>
    </item>
  </channel>
</rss>

