<?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: (yet another) set analysis with a variable question in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51818#M3467</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Metric={$(=$(vNumFilter))}&amp;gt;}Result)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Metric={$(vNumFilter)}&amp;gt;}Result)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 May 2018 18:22:40 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-05-17T18:22:40Z</dc:date>
    <item>
      <title>(yet another) set analysis with a variable question</title>
      <link>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51817#M3466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've looked through about a dozen posts on the forum to try to solve this, but can't seem to figure out the correct syntax. I'm trying to use a variable as a criteria in a set expression. The variable returns a string concatenation based on the selections made in two combo-boxes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #993300; font-family: 'courier new', courier;"&gt;chr(39)&amp;amp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #993300;"&gt;if(match(pMetric,'Frq-P','Sev-P','Frq-R','PP-P')&amp;gt;0,only(Cov_Prefix),'')&amp;amp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #993300; font-family: 'courier new', courier;"&gt;only(Num_1)&amp;amp;chr(39)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;When expanded as &lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #993300;"&gt;=$(vNumFilter)&lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;, this returns the following string: &lt;SPAN style="color: #993300; font-family: 'courier new', courier;"&gt;'PD_Paid_$'&lt;/SPAN&gt;, which is correct based on the selections I've made. I'm running into problems when I try to use it in a set expression. I've tried a variety of approaches and can't seem to get it to work:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #993300;"&gt;Sum({&amp;lt;Metric={"=$(vNumFilter)"}&amp;gt;}Result)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #993300;"&gt;Sum({&amp;lt;Metric={"$(vNumFilter)"}&amp;gt;}Result)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #993300;"&gt;Sum({&amp;lt;Metric={=$(vNumFilter)}&amp;gt;}Result)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #993300;"&gt;Sum({&amp;lt;Metric={$(vNumFilter)}&amp;gt;}Result)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #993300; font-family: 'courier new', courier;"&gt;Sum({&amp;lt;Metric={$(=vNumFilter)}&amp;gt;}Result)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also tried the variable with and without the &lt;SPAN style="color: #993300; font-family: 'courier new', courier;"&gt;chr(39)&lt;/SPAN&gt; for the single quotes. I've also tried substituting the text string directly just to make sure it's not the variable. the equation works correctly in this format:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #993300; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;Sum({&amp;lt;Metric={'PD_Paid_$'}&amp;gt;}Result)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing or doing wrong? Thanks for any help you can provide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 18:13:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51817#M3466</guid>
      <dc:creator>phuelish</dc:creator>
      <dc:date>2018-05-17T18:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: (yet another) set analysis with a variable question</title>
      <link>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51818#M3467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Metric={$(=$(vNumFilter))}&amp;gt;}Result)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Metric={$(vNumFilter)}&amp;gt;}Result)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 18:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51818#M3467</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-17T18:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: (yet another) set analysis with a variable question</title>
      <link>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51819#M3468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, no &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/plain.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 18:28:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51819#M3468</guid>
      <dc:creator>phuelish</dc:creator>
      <dc:date>2018-05-17T18:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: (yet another) set analysis with a variable question</title>
      <link>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51820#M3469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you remove the double quotes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 18:32:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51820#M3469</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-17T18:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: (yet another) set analysis with a variable question</title>
      <link>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51821#M3470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 18:39:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51821#M3470</guid>
      <dc:creator>phuelish</dc:creator>
      <dc:date>2018-05-17T18:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: (yet another) set analysis with a variable question</title>
      <link>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51822#M3471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would it be possible to share a sample to check this out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 18:41:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51822#M3471</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-17T18:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: (yet another) set analysis with a variable question</title>
      <link>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51823#M3472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured out the problem. Essentially it's a double-expansion problem. I need the variable to expand the possible values using p(), then would need to expand the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to make it work by sticking the variable equation directly inside the set analysis and modified it slightly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #993300; font-family: courier new,courier;"&gt;Sum({&amp;lt;Metric={$(=if(match(pMetric,'Frq-P','Sev-P','Frq-R','PP-P')&amp;gt;0,only(Cov_Prefix),'')&amp;amp;only(Num_1))}&amp;gt;}Result)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 19:37:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/yet-another-set-analysis-with-a-variable-question/m-p/51823#M3472</guid>
      <dc:creator>phuelish</dc:creator>
      <dc:date>2018-05-17T19:37:52Z</dc:date>
    </item>
  </channel>
</rss>

