<?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 How do i use the P() function? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498963#M186411</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am currently using these expressions to calculate the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum for first 3 months:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Month={'&amp;gt;=$(=min(Month))&amp;lt;=$(=min(Month)+2)'}&amp;gt;}[Total Units])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum for last 3 months:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Month={'&amp;gt;=$(=max(Month)-2)&amp;lt;=$(=max(Month))'}&amp;gt;}[Total Units])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dimension is [Meter Serial Number]&lt;/P&gt;&lt;P&gt;How would i use the P() function to only show the sum for the specific [Meter Serial Number] in the row?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Christopher.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Oct 2013 12:38:21 GMT</pubDate>
    <dc:creator>cclayford</dc:creator>
    <dc:date>2013-10-01T12:38:21Z</dc:date>
    <item>
      <title>How do i use the P() function?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498963#M186411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am currently using these expressions to calculate the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum for first 3 months:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Month={'&amp;gt;=$(=min(Month))&amp;lt;=$(=min(Month)+2)'}&amp;gt;}[Total Units])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum for last 3 months:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Month={'&amp;gt;=$(=max(Month)-2)&amp;lt;=$(=max(Month))'}&amp;gt;}[Total Units])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dimension is [Meter Serial Number]&lt;/P&gt;&lt;P&gt;How would i use the P() function to only show the sum for the specific [Meter Serial Number] in the row?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Christopher.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 12:38:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498963#M186411</guid>
      <dc:creator>cclayford</dc:creator>
      <dc:date>2013-10-01T12:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do i use the P() function?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498964#M186412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Customer = P({1&amp;lt;Product={‘Shoe’}&amp;gt;} Customer)&amp;gt;} Sales &lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;returns the sales for current selection, but only those customers that ever have bought the product ‘Shoe’. The element function P( ) here returns a list of possible customers; those that are implied by the selection ‘Shoe’ in the field Product. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Customer = P({1&amp;lt;Product={‘Shoe’}&amp;gt;})&amp;gt;} Sales &lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;same as above. If the field in the element function is omitted, the function will return the possible values of the field specified in the outer assignment. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Customer = P({1&amp;lt;Product={‘Shoe’}&amp;gt;} Supplier)&amp;gt;} Sales &lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;returns the sales for current selection, but only those customers that ever have supplied the product ‘Shoe’. The element function P( ) here returns a list of possible suppliers; those that are implied by the selection ‘Shoe’ in the field Product. The list of suppliers is then used as a selection in the field Customer. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Customer = E({1&amp;lt;Product={‘Shoe’}&amp;gt;})&amp;gt;} Sales &lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;returns the sales for current selection, but only those customers that never bought the product ‘Shoe’. The element function E( ) here returns the list of excluded customers; those that are excluded by the selection ‘Shoe’ in the field Product.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SEE THE HELP FOR MORE INFORMATION&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 12:46:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498964#M186412</guid>
      <dc:creator>nizamsha</dc:creator>
      <dc:date>2013-10-01T12:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do i use the P() function?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498965#M186413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this in my expression, but it does not bring back the desired result:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[Meter Serial Number] = P([Meter Serial Number])&amp;gt;}{&amp;lt;Month={'&amp;gt;=$(=min(Month))&amp;lt;=$(=min(Month)+2)'}&amp;gt;}[Total Units])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 13:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498965#M186413</guid>
      <dc:creator>cclayford</dc:creator>
      <dc:date>2013-10-01T13:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do i use the P() function?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498966#M186414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;[Meter Serial Number] = P(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{1&amp;lt;Month={'&amp;gt;=$(=min(Month))&amp;lt;=$(=min(Month)+2)'}&amp;gt;}&lt;/SPAN&gt;[Meter Serial Number])&amp;gt;}[Total Units])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 15:20:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498966#M186414</guid>
      <dc:creator>nizamsha</dc:creator>
      <dc:date>2013-10-01T15:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do i use the P() function?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498967#M186415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want the set expression to consider the current dimension value? A set expression is only evaluated once, not per dimension value, you can compare it to a user selection that's specific to that aggregation, that defines the working set for that aggregation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this blog post, where you may find also a work around:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-1335"&gt;Evaluating "sets" in the context of a dimension&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 15:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-i-use-the-P-function/m-p/498967#M186415</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-10-01T15:33:12Z</dc:date>
    </item>
  </channel>
</rss>

