<?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 Inside Another Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Inside-Another-Set-Analysis/m-p/1221217#M857686</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh the aggr function is quite a beautiful specimen. Figured this one out!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jan 2017 02:04:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-01-24T02:04:56Z</dc:date>
    <item>
      <title>Set Analysis Inside Another Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Inside-Another-Set-Analysis/m-p/1221216#M857685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Qlik Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started this project with a lot of hair and have since purchased 3 bottles of Rogaine on Amazon...Please help me stop losing hair!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have weekly sales data by store location for the previous 2 years. Here is a sample of the data:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt;"&gt;Store#, Week, Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;471, 1/3/2015, $300&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2276, 1/3/2015, $700&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1314, 1/3/2015, $400&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;471, 1/2/2016, $500&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2276, 1/2/2016, $600&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two input variables for a user to enter as their desired date ranges.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to show the sales for stores that had sales for both the desired date range selected and it's prior year comparable date range&lt;/P&gt;&lt;P&gt;(i.e. 1/2/2016's prior year comparable week is 1/3/2015; basically just -364 from the current year date to get its comparable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, let's say the user selected the lone week of 1/2/2016&lt;/P&gt;&lt;P&gt;I need the table to aggregate the sales for store #s 471 and 2276 since they had sales for both the selected week and its prior year comparable week:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Desired Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Current Year Sales: $1,100&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Prior Year Sales: $1,000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been thinking the best way to do this would be to have a count function in place to count the weeks in both the desired selection and prior year using a set analysis for the prior year data. Then aggregating the sales data for shops that have 2 weeks of sales on record (1 for current and 1 for prior)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current expression that is not working:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum(if(count({$&amp;lt;%WeekKey={"&amp;gt;=$(=vStartDate)&amp;lt;=$(=vEndDate)"}&amp;gt;}%WeekKey)=13,SalesCY,0))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you followed all of this, I already applaud you. If you comprehended this and are actually able to help me with what I am trying to accomplish, I will be your best friend until the end of time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Inside-Another-Set-Analysis/m-p/1221216#M857685</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Inside Another Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Inside-Another-Set-Analysis/m-p/1221217#M857686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh the aggr function is quite a beautiful specimen. Figured this one out!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2017 02:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Inside-Another-Set-Analysis/m-p/1221217#M857686</guid>
      <dc:creator />
      <dc:date>2017-01-24T02:04:56Z</dc:date>
    </item>
  </channel>
</rss>

