<?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 GetCurrentSelections as a Calculation Condition? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376118#M1167613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GetCurrentSelections() will return the selections in a string, so I believe the count of that string will never be larger than 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can look into the optional arguments to GetCurrentSelections() to set special delimiter for records and values, and then use a substringcount to check the number of fields you selected in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=SubStringCount( GetCurrentSelections('\'),'\') &amp;gt;= 2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I am only comparing to 2 since a delimiter is separating two fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Aug 2012 09:50:52 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-08-08T09:50:52Z</dc:date>
    <item>
      <title>Using GetCurrentSelections as a Calculation Condition?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376117#M1167612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use GetCurrentSelections as a calculation condition for a particularly large straight table.&amp;nbsp; I want users to select at least three conditions to limit the amount of data that is returned and prevent the report from running too slowly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count(GetCurrentSelections())&amp;gt;=3 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the QlikView application crashes when I run this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on &lt;A _jive_internal="true" href="https://community.qlik.com/message/197619#197619"&gt;this discussion&lt;/A&gt; I've also tried &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=len(GetCurrentSelections())&amp;gt;=3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't crash, but it also doesn't produce an error when fewer than three conditions are selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions very much appreciated.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 08:57:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376117#M1167612</guid>
      <dc:creator />
      <dc:date>2012-08-08T08:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using GetCurrentSelections as a Calculation Condition?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376118#M1167613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GetCurrentSelections() will return the selections in a string, so I believe the count of that string will never be larger than 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can look into the optional arguments to GetCurrentSelections() to set special delimiter for records and values, and then use a substringcount to check the number of fields you selected in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=SubStringCount( GetCurrentSelections('\'),'\') &amp;gt;= 2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I am only comparing to 2 since a delimiter is separating two fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 09:50:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376118#M1167613</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-08T09:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using GetCurrentSelections as a Calculation Condition?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376119#M1167614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can do a little trick:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=substringcount (getcurrentselections (chr(13), '=', ';', 10 ),'=')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 09:50:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376119#M1167614</guid>
      <dc:creator />
      <dc:date>2012-08-08T09:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using GetCurrentSelections as a Calculation Condition?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376120#M1167615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much, both answers are very helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We decided to go a different way and use GetPossibleCount to limit the possible returns to 10,000.&amp;nbsp; If there are more than that the user gets an error message saying 'Not enough selections.&amp;nbsp; Please apply more filters.' until fewer than 10K records are returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That solved the speed problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 09:57:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376120#M1167615</guid>
      <dc:creator />
      <dc:date>2012-08-08T09:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using GetCurrentSelections as a Calculation Condition?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376121#M1167616</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 believe you need to have a field name in your expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len(GetCurrentSelections(FieldName))&amp;gt;=3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rahul &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 09:57:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376121#M1167616</guid>
      <dc:creator />
      <dc:date>2012-08-08T09:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using GetCurrentSelections as a Calculation Condition?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376122#M1167617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul, thank you for your input.&amp;nbsp; We didn't want to limit the selection to one particular filter, we wanted at least three of the filters available to be selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 10:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-GetCurrentSelections-as-a-Calculation-Condition/m-p/376122#M1167617</guid>
      <dc:creator />
      <dc:date>2012-08-08T10:00:53Z</dc:date>
    </item>
  </channel>
</rss>

