<?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() Function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/P-Function/m-p/1288411#M862190</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. I understand. What I wanted to achive is a pivot table to show the invoices amount given a month and a year but only for those customers which first invoice is in the period of the two previous months and the selected one. Like this one. &lt;IMG alt="Captura.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/148710_Captura.JPG" style="max-width: 620px; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Finally I got it mapping in the load script the first invoice date and using the following expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;EM&gt;Sum( TOTAL AGGR(Sum({&amp;lt;FirstInvoiceDate={'&amp;gt;=$(=AddMonths(MakeDate(CalendarYear, CalendarMonth),-2))'}&amp;gt;}&amp;nbsp;&amp;nbsp; InvoiceAmount), CalendarYear, CalendarMonth, Customer))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your time&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Jan 2017 19:15:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-01-08T19:15:49Z</dc:date>
    <item>
      <title>P() Function</title>
      <link>https://community.qlik.com/t5/QlikView/P-Function/m-p/1288407#M862186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, hope someone can help me. Is this a correct way of&amp;nbsp; using the P function? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum({$&amp;lt;Customer=P({&amp;lt;Min(TOTAL &amp;lt;Customer&amp;gt; InvoiceDate)&amp;gt;=AddMonths(MakeDate(CalendarYear, CalendarMonth), -2)&amp;gt;} Customer)&amp;gt;} InvoiceAmount)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mean, can I use the &lt;EM style="font-size: 13.3333px;"&gt;Min(TOTAL &amp;lt;Customer&amp;gt; InvoiceDate)&amp;gt;=AddMonths(MakeDate(CalendarYear, CalendarMonth), -2)&lt;/EM&gt;&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;Regards.&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/P-Function/m-p/1288407#M862186</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: P() Function</title>
      <link>https://community.qlik.com/t5/QlikView/P-Function/m-p/1288408#M862187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, it's not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{&amp;lt;Min(TOTAL &amp;lt;Customer&amp;gt; InvoiceDate)&amp;gt;=AddMonths(MakeDate(CalendarYear, CalendarMonth), -2)&amp;gt;} &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is not a valid set analysis expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jan 2017 00:49:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/P-Function/m-p/1288408#M862187</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-01-07T00:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: P() Function</title>
      <link>https://community.qlik.com/t5/QlikView/P-Function/m-p/1288409#M862188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok thank you so is there a workaround to achive this?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jan 2017 00:55:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/P-Function/m-p/1288409#M862188</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-07T00:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: P() Function</title>
      <link>https://community.qlik.com/t5/QlikView/P-Function/m-p/1288410#M862189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To achieve what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, but it's unclear what you want to achieve finally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can use an advanced search:&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({$&amp;lt;Customer= {"=Min(InvoiceDate) &amp;gt;=AddMonths(MakeDate(CalendarYear, CalendarMonth), -2)"} &amp;gt;} InvoiceAmount)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am not sure what your context is, e.g. the value of CalendarYear and CalendarMonth in the context Customer. Both fields need to show only one single value per Customer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jan 2017 10:04:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/P-Function/m-p/1288410#M862189</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-01-07T10:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: P() Function</title>
      <link>https://community.qlik.com/t5/QlikView/P-Function/m-p/1288411#M862190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. I understand. What I wanted to achive is a pivot table to show the invoices amount given a month and a year but only for those customers which first invoice is in the period of the two previous months and the selected one. Like this one. &lt;IMG alt="Captura.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/148710_Captura.JPG" style="max-width: 620px; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Finally I got it mapping in the load script the first invoice date and using the following expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;EM&gt;Sum( TOTAL AGGR(Sum({&amp;lt;FirstInvoiceDate={'&amp;gt;=$(=AddMonths(MakeDate(CalendarYear, CalendarMonth),-2))'}&amp;gt;}&amp;nbsp;&amp;nbsp; InvoiceAmount), CalendarYear, CalendarMonth, Customer))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your time&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2017 19:15:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/P-Function/m-p/1288411#M862190</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-08T19:15:49Z</dc:date>
    </item>
  </channel>
</rss>

