<?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: calculated variable in indirect p() statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403247#M150025</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CaseId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StartMonth&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'=$(vtestMonth)'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CaseId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CaseId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Nov 2012 15:39:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-05T15:39:25Z</dc:date>
    <item>
      <title>calculated variable in indirect p() statement</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403246#M150024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I very need you help because have a problem which torment me for a long time &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;I cannot imaginate how to pass calculated value from variable to the p() statement. I have created a small example, in which I should get the same result in column "second" as it's in "first" column. In "first" column i directly wrote value but in "second" column i have to use variable value.&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 15:34:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403246#M150024</guid>
      <dc:creator />
      <dc:date>2012-11-05T15:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in indirect p() statement</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403247#M150025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CaseId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StartMonth&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'=$(vtestMonth)'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CaseId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CaseId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 15:39:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403247#M150025</guid>
      <dc:creator />
      <dc:date>2012-11-05T15:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in indirect p() statement</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403248#M150026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change your variable definition to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=makedate(2012,04,01)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(note the equal sign), and your set expression to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CaseId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StartMonth&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(vtestMonth)'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CaseId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CaseId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;note the single quotes around the dollar sign expansion&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hope this helps,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Stefan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 15:45:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403248#M150026</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-05T15:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in indirect p() statement</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403249#M150027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for answers. But I have a question yet. Please see attached file above &lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/download/277588-48959/sample_p()_2.qvw" style="background-color: #ffffff; font-size: 11px; margin: 0 3px 0 0; color: #007fc0; font-family: Arial;"&gt;sample_p()_2.qvw.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;P() works only when I've selected filter, but I would like that it works also without selection. My goal is to calculate quantity of that CaseId for each StartMonth where CaseIds are the same as in previous month. Who knows?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2012 11:17:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403249#M150027</guid>
      <dc:creator />
      <dc:date>2012-11-06T11:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in indirect p() statement</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403250#M150028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A set expression is evaluated once per chart, not per dimension value, I think this is what you assume here.&lt;/P&gt;&lt;P&gt;So set analysis will not work like expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But try maybe something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count(aggr(if(CaseId=above(CaseId),CaseId),CaseId,StartMonth))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You just need to assure that the load order of StartMonth is in chronological order (since advanced aggregation will order its dimension values in load order).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2012 11:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403250#M150028</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-06T11:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: calculated variable in indirect p() statement</title>
      <link>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403251#M150029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but if need to calculate unique Caseids for current and previous 2 month (range of 3 months). What the statement should be? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2012 11:57:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculated-variable-in-indirect-p-statement/m-p/403251#M150029</guid>
      <dc:creator />
      <dc:date>2012-11-06T11:57:09Z</dc:date>
    </item>
  </channel>
</rss>

