<?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 Use variable (which includes a calculation) in set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-variable-which-includes-a-calculation-in-set-Analysis/m-p/530643#M692320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a calculations with Set Analyis but I can not make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to identify which items has stock in the past 5 weeks but does not&amp;nbsp; have any sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To calculate the Stock I need to summerize all the stock changes.&lt;/P&gt;&lt;P&gt;So purchases 10, Sold 5, Purchases 2 is a stock of 7&lt;/P&gt;&lt;P&gt;I have created a variable called vSellableInventory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;HFBNo= {$(vSalesHFB)}, CatalogYear=, CatalogYearTertial=, CatalogYearMonth=, CatalogYearWeek=, CatalogWeek=, Tertial=, YearQuarter=, WeeksAgoIndicator= , DateNo= {'&amp;lt;=$(=Max(DateNo))'}&amp;gt;} SellableQty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No i created a Set Analysis like &lt;/P&gt;&lt;P&gt;=sum({1&amp;lt;CompanyStoreName = P(CompanyStoreName), ItemNo = {"=$(vSellableInventory) &amp;gt; 0"}, ItemNo = {"=$(vQtySales) = 0"}, &lt;/P&gt;&lt;P&gt;WeeksAgo = {"&amp;lt;= 5"}&amp;gt;} ItemCounter) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should give me all the items thats has stock but nu sales in the past 5 weeks, but unfortunatily it does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Sep 2013 10:16:06 GMT</pubDate>
    <dc:creator>jjordaan</dc:creator>
    <dc:date>2013-09-17T10:16:06Z</dc:date>
    <item>
      <title>Use variable (which includes a calculation) in set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variable-which-includes-a-calculation-in-set-Analysis/m-p/530643#M692320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a calculations with Set Analyis but I can not make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to identify which items has stock in the past 5 weeks but does not&amp;nbsp; have any sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To calculate the Stock I need to summerize all the stock changes.&lt;/P&gt;&lt;P&gt;So purchases 10, Sold 5, Purchases 2 is a stock of 7&lt;/P&gt;&lt;P&gt;I have created a variable called vSellableInventory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;HFBNo= {$(vSalesHFB)}, CatalogYear=, CatalogYearTertial=, CatalogYearMonth=, CatalogYearWeek=, CatalogWeek=, Tertial=, YearQuarter=, WeeksAgoIndicator= , DateNo= {'&amp;lt;=$(=Max(DateNo))'}&amp;gt;} SellableQty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No i created a Set Analysis like &lt;/P&gt;&lt;P&gt;=sum({1&amp;lt;CompanyStoreName = P(CompanyStoreName), ItemNo = {"=$(vSellableInventory) &amp;gt; 0"}, ItemNo = {"=$(vQtySales) = 0"}, &lt;/P&gt;&lt;P&gt;WeeksAgo = {"&amp;lt;= 5"}&amp;gt;} ItemCounter) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should give me all the items thats has stock but nu sales in the past 5 weeks, but unfortunatily it does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 10:16:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variable-which-includes-a-calculation-in-set-Analysis/m-p/530643#M692320</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2013-09-17T10:16:06Z</dc:date>
    </item>
  </channel>
</rss>

