<?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: How to add indirect set analysis to an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938271#M951403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gudmundur,&lt;/P&gt;&lt;P&gt;I've not able to test this of course so I apologise for syntax errors but I think you should take your set modifier that works and take the intersection of that with the set of stores that have had sales in the last two years. Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;DateKey = {"=InYearToDate(DateKey, Today(), 0)","=InYearToDate(DateKey, Today(), -1)",&lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), -2)"} &amp;gt; //Your set modifier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&amp;lt;StoreName = P({&amp;lt;DateKey = {"InYearToDate(DateKey, Today(), -1)"}&amp;gt; + &amp;lt;DateKey = {"InYearToDate(DateKey, Today(), -2)"}&amp;gt;})&amp;gt; // Additional set modifier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Dec 2015 09:26:38 GMT</pubDate>
    <dc:creator>effinty2112</dc:creator>
    <dc:date>2015-12-04T09:26:38Z</dc:date>
    <item>
      <title>How to add indirect set analysis to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938270#M951402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I´m trying to add indirect set analysis to an expression, the expression looks like this and works fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; DateKey = {"=InYearToDate(DateKey, Today(), 0)",&lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), -1)",&lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), -2)"} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like it to take into consideration only stores that had sales in the previous years to get a Like-For-Like comparison, and tried something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; DateKey = {"=InYearToDate(DateKey, Today(), 0)",&lt;/P&gt;&lt;P&gt;"[StoreName]=P(=InYearToDate(DateKey, Today(), -1)[StoreName])",&lt;/P&gt;&lt;P&gt;"[StoreName]=P(=InYearToDate(DateKey, Today(), -2)[StoreName])"} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this does not seem to be correct, does anyone have a suggestion on how to add the P() to this expression?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 15:01:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938270#M951402</guid>
      <dc:creator />
      <dc:date>2015-12-02T15:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to add indirect set analysis to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938271#M951403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gudmundur,&lt;/P&gt;&lt;P&gt;I've not able to test this of course so I apologise for syntax errors but I think you should take your set modifier that works and take the intersection of that with the set of stores that have had sales in the last two years. Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;DateKey = {"=InYearToDate(DateKey, Today(), 0)","=InYearToDate(DateKey, Today(), -1)",&lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), -2)"} &amp;gt; //Your set modifier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&amp;lt;StoreName = P({&amp;lt;DateKey = {"InYearToDate(DateKey, Today(), -1)"}&amp;gt; + &amp;lt;DateKey = {"InYearToDate(DateKey, Today(), -2)"}&amp;gt;})&amp;gt; // Additional set modifier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 09:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938271#M951403</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2015-12-04T09:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to add indirect set analysis to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938272#M951404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Andrew for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried what you suggested, but I´m not getting the syntax correct, but here is how I made the expression, note that this is taking 3 years into account:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;DateKey = {"=InYearToDate(DateKey, Today(), 0)",&lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), -1)",&lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), -2)"}&amp;gt;} Sales) *&lt;/P&gt;&lt;P&gt;&amp;lt;[StoreName]=P({&amp;lt; Sum({&amp;lt; DateKey = {"=InYearToDate(DateKey, Today(), 0)", &lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), -1)",&lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), -2)"} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 11:16:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938272#M951404</guid>
      <dc:creator />
      <dc:date>2015-12-04T11:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to add indirect set analysis to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938273#M951405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gudmundur,&lt;/P&gt;&lt;P&gt;Without being able to try this out I can't guarantee the syntax is correct but let's try it. I've added notes that I hope help out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&lt;/P&gt;&lt;P&gt;&amp;lt;DateKey = {"=InYearToDate(DateKey, Today(), 0)","=InYearToDate(DateKey, Today(), -1)","=InYearToDate(DateKey, Today(), -2)"}&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&amp;lt; // open angle bracket to begin new set modifier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[StoreName]=&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P({&amp;lt; // open brackets for P expression. Always take form P({&amp;lt; ... &amp;gt;})&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DateKey = {&lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), 0)",&lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), -1)",&lt;/P&gt;&lt;P&gt;"=InYearToDate(DateKey, Today(), -2)"} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;}) // close brackets for P expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; // closed angle bracket to end new set modifier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Dec 2015 15:22:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938273#M951405</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2015-12-04T15:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to add indirect set analysis to an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938274#M951406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this and I get OK on the syntax but it is not working, I still get all stores, not just those that have sales in both or all selected years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;DateKey={"=InYearToDate(DateKey, Today(), 0)", "=InYearToDate(DateKey, Today(), -1)", "=InYearToDate(DateKey, Today(), -2)"}&amp;gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&amp;lt;[StoreName]=P({&amp;lt;DateKey={"=InYearToDate(DateKey, Today(), 0)", "=InYearToDate(DateKey, Today(), -1)", "=InYearToDate(DateKey, Today(), -2)"}&amp;gt;})&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have any more ideas that would be great, thanks again for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Gudmundur.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 10:19:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-indirect-set-analysis-to-an-expression/m-p/938274#M951406</guid>
      <dc:creator />
      <dc:date>2015-12-08T10:19:51Z</dc:date>
    </item>
  </channel>
</rss>

