<?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: Set Analysis Formula with Parameter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42394#M458134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add single quotes to the parameter 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(f_Count(value1, value2, &lt;SPAN style="; color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;$(vD_AddXMonthsRange(-6))&lt;SPAN style="; color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, replace $5 by $3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2018 15:26:01 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2018-05-16T15:26:01Z</dc:date>
    <item>
      <title>Set Analysis Formula with Parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42393#M458133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi together,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have the following Set Analysis Formula with Parameters:&lt;/P&gt;&lt;P&gt;fCount =Count({$&amp;lt; &lt;SPAN style="font-size: 10pt;"&gt;Field1 = {'$1'}, &lt;/SPAN&gt;Field2&amp;nbsp; = {'$1'}, Date = {$(=$5)}&amp;nbsp; &amp;gt; &lt;SPAN style="font-size: 10pt;"&gt;} &lt;/SPAN&gt; [Value]&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I set the values and variables directly into the formula, like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;fCount =Count({$&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Field1 = {'value1'}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Field2&amp;nbsp; = {'value2'}, Date = {$(=$(vD_AddXMonthsRange(-6)))}&amp;nbsp; &amp;gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; [Value]&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;it works. But if I want to use the formula with Parameters, like&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=$(f_Count(value1,value2,$(vD_AddXMonthsRange(-6))))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;i got an error. Unfortuanetly I can´t find the error for this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks for your help!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 12:07:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42393#M458133</guid>
      <dc:creator>dschuebel</dc:creator>
      <dc:date>2018-05-16T12:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Formula with Parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42394#M458134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add single quotes to the parameter 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(f_Count(value1, value2, &lt;SPAN style="; color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;$(vD_AddXMonthsRange(-6))&lt;SPAN style="; color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, replace $5 by $3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 15:26:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42394#M458134</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2018-05-16T15:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Formula with Parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42395#M458135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for you reply. Unfortunately it not helps.&lt;/P&gt;&lt;P&gt;For better understanding, followed my formula for vD_AddXMonthsRange:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHR(39) &amp;amp; '&amp;gt;=' &amp;amp; AddMonths(vD_CurrentDateInput, $1) &amp;amp; '&amp;lt;=' &amp;amp; vD_CurrentDateInput &amp;amp; CHR(39)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used $1, $2 and $3. It was only a mistake in my post &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 15:36:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42395#M458135</guid>
      <dc:creator>dschuebel</dc:creator>
      <dc:date>2018-05-16T15:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Formula with Parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42396#M458136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the output of the AddMonths() function in the same format than the field "Date"?&lt;/P&gt;&lt;P&gt;Also, always use Chr(34) or " when the right side of the set modifier is a search (in this case, a range) and not a fixed value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 07:03:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42396#M458136</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2018-05-17T07:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Formula with Parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42397#M458137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;Hey Miguel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;the format from the AddMonths function is in the same Format. Please find attached my Test-Application about this problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;I tried to use Chr(34), but I have the same problem .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 09:07:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42397#M458137</guid>
      <dc:creator>dschuebel</dc:creator>
      <dc:date>2018-05-17T09:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Formula with Parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42398#M458138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would go for modifying the fSum variable to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15269757810693307" jivemacro_uid="_15269757810693307"&gt;
&lt;P&gt;Sum({$&amp;lt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Field1&amp;nbsp; = {'$1'},&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Field2&amp;nbsp; = {'$2'},&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Datum = {"&amp;gt;=$(=AddMonths(Datum, $3))&amp;lt;=$(=Date(Max(Datum)))"}&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Value]&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expansion within the expansion, while maybe possible, is returning already calculated values instead of text. This expression above in the fSum will work, though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 07:57:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42398#M458138</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2018-05-22T07:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Formula with Parameter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42399#M458139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel, thanks for your response.&lt;/P&gt;&lt;P&gt;Unfortunately, if I use this formula I´m not so flexible, because I don´t want only use formulas like the&amp;nbsp; AddXMonths, I want to use also some other formulas for set the Date Parameter &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 08:28:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Formula-with-Parameter/m-p/42399#M458139</guid>
      <dc:creator>dschuebel</dc:creator>
      <dc:date>2018-05-22T08:28:24Z</dc:date>
    </item>
  </channel>
</rss>

