<?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: P() set analysis with multiple conditions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90652#M457853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response. Unfortunately, this returns tot sum of max year net sales. Similar to the statement below:&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;&amp;lt;Year={$(=Max(Year))}&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;NetSalesUSD)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2018 12:15:39 GMT</pubDate>
    <dc:creator>michaelsikora</dc:creator>
    <dc:date>2018-08-01T12:15:39Z</dc:date>
    <item>
      <title>P() set analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90649#M457850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create an expression that uses set analysis to show sales where a couple of different metrics need to be taken into consideration. The expression below shows me the net sales for unique product ID's that had sales last year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;&lt;/P&gt;&lt;P&gt;Year={$(=Max(Year))},&lt;/P&gt;&lt;P&gt;ProdId = p({&amp;lt;Year={$(=max(Year)-1)},CurPrevYTD={1}&amp;gt;} ProdId)&lt;/P&gt;&lt;P&gt;&amp;gt;} NetSalesUSD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I want to take into consideration the warehouse that the product is coming out of. I thought that the following expression might work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;&lt;/P&gt;&lt;P&gt;Year={$(=Max(Year))},&lt;/P&gt;&lt;P&gt;ProdId = p({&amp;lt;Year={$(=max(Year)-1)},CurPrevYTD={1}&amp;gt;} ProdId),&lt;/P&gt;&lt;P&gt;Whse_Name = p({&amp;lt;Year={$(=max(Year)-1)}&amp;gt;} Whse_Name)&lt;/P&gt;&lt;P&gt;&amp;gt;} NetSalesUSD)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that&lt;SPAN style="font-size: 13.3333px;"&gt; the P() for ProdId and P() for Whse_Name are looked at separately. &lt;/SPAN&gt;Any ideas on how to make the set analysis take both ProdId and Whse_name into consideration together?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 21:19:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90649#M457850</guid>
      <dc:creator>michaelsikora</dc:creator>
      <dc:date>2018-07-31T21:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: P() set analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90650#M457851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=sum({&amp;lt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Year={$(=Max(Year))},&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ProdId = p({&amp;lt;Year={$(=max(Year)-1)},CurPrevYTD={1}&amp;gt;} ProdId) &lt;STRONG style="color: #ff0000;"&gt;&amp;gt;+&amp;lt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Whse_Name = p({&amp;lt;Year={$(=max(Year)-1)}&amp;gt;} Whse_Name)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;} NetSalesUSD)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 21:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90650#M457851</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-07-31T21:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: P() set analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90651#M457852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be create a new field in the script like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Prodid &amp;amp; Whse_Name as ProdWhseKey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Sum({&amp;lt;Year = {$(=Max(Year))}, &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;ProdWhseKey&lt;/STRONG&gt;&lt;/SPAN&gt; = p({&amp;lt;Year = {$(=Max(Year)-1)}, CurPrevYTD = {1}&amp;gt;} ProdId)&amp;gt;} NetSalesUSD)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 01:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90651#M457852</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-01T01:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: P() set analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90652#M457853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response. Unfortunately, this returns tot sum of max year net sales. Similar to the statement below:&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;&amp;lt;Year={$(=Max(Year))}&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;NetSalesUSD)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 12:15:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90652#M457853</guid>
      <dc:creator>michaelsikora</dc:creator>
      <dc:date>2018-08-01T12:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: P() set analysis with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90653#M457854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny - this is exactly the answer I was looking for. Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 19:55:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/P-set-analysis-with-multiple-conditions/m-p/90653#M457854</guid>
      <dc:creator>michaelsikora</dc:creator>
      <dc:date>2018-08-01T19:55:55Z</dc:date>
    </item>
  </channel>
</rss>

