<?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: Using GetFieldSelections in Set Analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357975#M30358</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P&gt;You can try below expression,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(isNull(GetFieldSelections(Occupation)),0,sum(employee_count))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then try by selecting occupation one by one.&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 May 2017 09:57:02 GMT</pubDate>
    <dc:creator>VishalWaghole</dc:creator>
    <dc:date>2017-05-17T09:57:02Z</dc:date>
    <item>
      <title>Using GetFieldSelections in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357972#M30355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My eyes are going crossed trying to figure this out. Please help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;I have a filter pane (Occupation) that I want to use to dynamically create a set analysis filter.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following set statement is successful if I only select &lt;STRONG&gt;ONE&lt;/STRONG&gt; value from my Occupation filter:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count({&amp;lt;Occupation ={"$(=GetFieldSelections(Occupation,','))"}&amp;gt;}EMPLOYEE_COUNTER)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;However, if I select more than one value then it can't evaluate successfully because the filter string that's built is missing quotes (' ')....so I added the Chr(39) below but can't get it to work at all now &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count({&amp;lt;Occupation ={"$(=Chr(39)&amp;amp;GetFieldSelections(Occupation,Chr(39)&amp;amp; ','&amp;amp;Chr(39))&amp;amp;Chr(39))"}&amp;gt;}EMPLOYEE_COUNTER)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The goal is to have a statement that looks like the follows after the user selects 'Doctor', 'Nurse', and 'Firefighter' from the Occupation filter.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({&amp;lt;Occupation = {'Doctor','Nurse','Firefighter'}&amp;gt;}EMPLOYEE_COUNTER)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you can think of a better way to do it in general than what I'm doing, I'm all ears as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 01:50:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357972#M30355</guid>
      <dc:creator>Danny_Langley</dc:creator>
      <dc:date>2017-05-17T01:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using GetFieldSelections in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357973#M30356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this: (i removed the excess " ")&lt;/P&gt;&lt;P&gt;=count({&amp;lt;Occupation={$(=chr(39)&amp;amp;GetFieldSelections(Occupation,chr(39)&amp;amp;','&amp;amp;chr(39))&amp;amp;chr(39))}&amp;gt;}EMPLOYEE_COUNTER)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 03:16:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357973#M30356</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T03:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using GetFieldSelections in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357974#M30357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But why do you even need to add set analysis for that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Showing associated data based on selections is Natural behavior you don't need set analysis for that??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still need set analysis try using&amp;nbsp; P ()&amp;nbsp;&amp;nbsp; , but I must re-iterate this is not required&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;count({&amp;lt;Occupation = P (Occupation)&amp;gt;}EMPLOYEE_COUNTER)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;To concat selections try below in textbox&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;=$(=chr (39)&amp;amp;concat (distinct fieldname, chr(39)&amp;amp;','&amp;amp;chr(39))&amp;amp;chr(39))&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 05:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357974#M30357</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-05-17T05:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using GetFieldSelections in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357975#M30358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P&gt;You can try below expression,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(isNull(GetFieldSelections(Occupation)),0,sum(employee_count))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then try by selecting occupation one by one.&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 09:57:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357975#M30358</guid>
      <dc:creator>VishalWaghole</dc:creator>
      <dc:date>2017-05-17T09:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using GetFieldSelections in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357976#M30359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much Vineeth! I knew someone would ask why I even need this because it's natural behavior....ha. I'm going to be working with the Occupation field as a data island to build the filter string to apply elsewhere for a calculation. Anyway, using the P function did the trick and is much simpler! Thanks so much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 13:00:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357976#M30359</guid>
      <dc:creator>Danny_Langley</dc:creator>
      <dc:date>2017-05-17T13:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using GetFieldSelections in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357977#M30360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yddona - thanks for your response - this worked as well. I just needed to remove the " ". It's always the small things that get you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 17:30:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-GetFieldSelections-in-Set-Analysis/m-p/1357977#M30360</guid>
      <dc:creator>Danny_Langley</dc:creator>
      <dc:date>2017-05-17T17:30:20Z</dc:date>
    </item>
  </channel>
</rss>

