<?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 Compare this year vs Last Year sales (same week) only if we sold more than 4 last year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Compare-this-year-vs-Last-Year-sales-same-week-only-if-we-sold/m-p/129474#M19535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on an expression that will show items that we sold last more than 4 cases, in the current week last year, and we sold less this year.&amp;nbsp; When doing it as one expression, it looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum({$&amp;lt;[CustItemKey]={"=sum({$&amp;lt;[FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity])&amp;gt;4"}, [FISC WeekId]={'=$(vMax_SO_Closed_Week)'}&amp;gt;} [Actual Quantity])&lt;/P&gt;&lt;P&gt;&amp;lt; &lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[CustItemKey]={"=sum({$&amp;lt;[FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity])&amp;gt;4"}, [FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity]), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately that is coming up blank. So I broke them down into separate expressions to see the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For This Year: sum({$&amp;lt;[CustItemKey]={"=sum({$&amp;lt;[FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity])&amp;gt;4"}, [FISC WeekId]={'=$(vMax_SO_Closed_Week)'}&amp;gt;} [Actual Quantity])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Last Year: sum({$&amp;lt;[CustItemKey]={"=sum({$&amp;lt;[FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity])&amp;gt;4"}, [FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These expressions are giving me the same exact values.&amp;nbsp; so they are definitely not working.&amp;nbsp; There is no way we sold the same exact values for everyone last year and this year.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some explanations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[FISC WeekId] is a field with the week number in the format of YYYYWW&lt;/P&gt;&lt;P&gt;vMax_SO_Closed_Week is The Maximum Week this year with data&lt;/P&gt;&lt;P&gt;VMax_SO_Closed_Week_LY is Last year of the Maximum week#&lt;/P&gt;&lt;P&gt;CustItemKey is a concatanted field that gives us a combination of customer and item, so we can test specific customer/ item relationships&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Oct 2018 14:31:53 GMT</pubDate>
    <dc:creator>djbloiss</dc:creator>
    <dc:date>2018-10-23T14:31:53Z</dc:date>
    <item>
      <title>Compare this year vs Last Year sales (same week) only if we sold more than 4 last year</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-this-year-vs-Last-Year-sales-same-week-only-if-we-sold/m-p/129474#M19535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on an expression that will show items that we sold last more than 4 cases, in the current week last year, and we sold less this year.&amp;nbsp; When doing it as one expression, it looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum({$&amp;lt;[CustItemKey]={"=sum({$&amp;lt;[FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity])&amp;gt;4"}, [FISC WeekId]={'=$(vMax_SO_Closed_Week)'}&amp;gt;} [Actual Quantity])&lt;/P&gt;&lt;P&gt;&amp;lt; &lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[CustItemKey]={"=sum({$&amp;lt;[FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity])&amp;gt;4"}, [FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity]), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately that is coming up blank. So I broke them down into separate expressions to see the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For This Year: sum({$&amp;lt;[CustItemKey]={"=sum({$&amp;lt;[FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity])&amp;gt;4"}, [FISC WeekId]={'=$(vMax_SO_Closed_Week)'}&amp;gt;} [Actual Quantity])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Last Year: sum({$&amp;lt;[CustItemKey]={"=sum({$&amp;lt;[FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity])&amp;gt;4"}, [FISC WeekId]={'=$(vMax_SO_Closed_Week_LY)'}&amp;gt;} [Actual Quantity])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These expressions are giving me the same exact values.&amp;nbsp; so they are definitely not working.&amp;nbsp; There is no way we sold the same exact values for everyone last year and this year.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some explanations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[FISC WeekId] is a field with the week number in the format of YYYYWW&lt;/P&gt;&lt;P&gt;vMax_SO_Closed_Week is The Maximum Week this year with data&lt;/P&gt;&lt;P&gt;VMax_SO_Closed_Week_LY is Last year of the Maximum week#&lt;/P&gt;&lt;P&gt;CustItemKey is a concatanted field that gives us a combination of customer and item, so we can test specific customer/ item relationships&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 14:31:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-this-year-vs-Last-Year-sales-same-week-only-if-we-sold/m-p/129474#M19535</guid>
      <dc:creator>djbloiss</dc:creator>
      <dc:date>2018-10-23T14:31:53Z</dc:date>
    </item>
  </channel>
</rss>

