<?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: Selections in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686806#M248809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Royale,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this (Here I'm considering my selection for Plant list)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='Customer Stoppers'&amp;amp;chr(32)&amp;amp;if(GetSelectedCount(Plant)&amp;gt;0,'- '&amp;amp;GetFieldSelections(Plant)&amp;amp;'')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jul 2014 09:36:28 GMT</pubDate>
    <dc:creator>amit_saini</dc:creator>
    <dc:date>2014-07-01T09:36:28Z</dc:date>
    <item>
      <title>Selections in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686802#M248805</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;I'm trying to create some set analysis code which which executes two different sums on different metrics depending on the outcome of an IF statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically if dimensions Name or Area are selected by the user from their respective List Boxes, I want to get the sum of Sales. Otherwise I want to sum the Sales Forecast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written it in the following way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Name]='*' and [Area]= '*',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Month={$(=month(max([Mth Yr])))}, Year={$(=max(Year)), [Day Type]={0}&amp;gt;} [Sales Forecast]),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sum({&amp;lt;Month={$(=month(max([Mth Yr])))}, Year={$(=max(Year))}&amp;gt;}[Sales Amount]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The IF statement does not work - how do I incorporate selections from List Boxes in the script?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks in advance.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 09:20:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686802#M248805</guid>
      <dc:creator />
      <dc:date>2014-07-01T09:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Selections in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686803#M248806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using GetFieldSelections(), like:&lt;/P&gt;&lt;P&gt;If ( GetFieldSelections(Name)&amp;gt;0 and GetFieldSelections(Area)&amp;gt;0 , ...., ....)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 09:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686803#M248806</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-07-01T09:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Selections in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686804#M248807</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;Replace the if by,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(GetSelectedCount(Name)&amp;gt;0 And GetSelectedCount(Area) &amp;gt; 0, &amp;lt;Forecast&amp;gt;, &amp;lt;Sales&amp;gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 09:24:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686804#M248807</guid>
      <dc:creator />
      <dc:date>2014-07-01T09:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Selections in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686805#M248808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(len([Name])&amp;gt;0 or len([Area])&amp;gt;0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;Month={$(=month(max([Mth Yr])))}, Year={$(=max(Year)), [Day Type]={0}&amp;gt;} [Sales Forecast]),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;sum({&amp;lt;Month={$(=month(max([Mth Yr])))}, Year={$(=max(Year))}&amp;gt;}[Sales Amount]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Vardhan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 09:29:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686805#M248808</guid>
      <dc:creator />
      <dc:date>2014-07-01T09:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Selections in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686806#M248809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Royale,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this (Here I'm considering my selection for Plant list)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='Customer Stoppers'&amp;amp;chr(32)&amp;amp;if(GetSelectedCount(Plant)&amp;gt;0,'- '&amp;amp;GetFieldSelections(Plant)&amp;amp;'')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 09:36:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686806#M248809</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2014-07-01T09:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Selections in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686807#M248810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for your replies, much appreciated, all useful answers. I used the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;GetSelectedCount&lt;/SPAN&gt; solution from &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;Prabhu&lt;/SPAN&gt;, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 02:45:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selections-in-Set-Analysis/m-p/686807#M248810</guid>
      <dc:creator />
      <dc:date>2014-07-02T02:45:32Z</dc:date>
    </item>
  </channel>
</rss>

